Commit 0990cd72 by liyuhang19990520

级联单位代码修改

parent 3eacb930
<!--
* @Author: your name
* @Date: 2021-11-15 14:15:58
* @LastEditTime: 2022-01-18 10:53:20
* @LastEditTime: 2022-01-18 15:43:56
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \founder_vue\src\components\confrim.vue
......@@ -145,10 +145,9 @@ export default {
if (data && data.length > 0) {
return data.map((item) => ({
...item,
key: !self.codeName
? `${item.region}[${item.code}]`
: `${item.region}`,
key: !self.codeName ? `${item.name}[${item.code}]` : `${item.region}`,
regions: this.getTreeData(item.regions),
childCodeDwXz: this.getTreeData(item.childCodeDwXz),
}));
}
},
......@@ -159,14 +158,14 @@ export default {
mounted() {
let self = this;
if (!this.codeName) {
let unidata = this.$store.state.publicData.unitData;
let unicode = this.$store.state.publicData.unitCode;
unicode = unicode.split(",");
if (this.options.length <= 0) {
this.options = this.getTreeData(
unidata.filter((i) => unicode.includes(i.code))
);
}
let unitAreaName = this.$store.state.publicData.unitAreaName;
this.$axios.get(`JsonData/${unitAreaName}.json`).then((res) => {
if (res.data.length > 0) {
if (this.options.length <= 0) {
this.options = self.getTreeData(res.data);
}
}
});
} else {
this.$axios.get(`JsonData/${this.codeName}.json`).then((res) => {
if (res.data.code == 0 && res.data.message == "success") {
......
/*
* @Author: your name
* @Date: 2021-11-02 15:41:31
* @LastEditTime: 2022-01-10 17:27:03
* @LastEditTime: 2022-01-18 15:47:49
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \founder_vue\src\store\modules\user.js
*/
import { _axios } from "@/plugins/axios";
const state = {
//所在单位所有json数据
unitData: [],
//用户所在单位code
unitCode: '540000000000,430000000000',
//所展现的地区代码文件名
unitAreaName: 'XzCodeJSON',
};
const mutations = {
......
......@@ -29,7 +29,7 @@
</div>
<div class="search-item">
<div class="label">用户所属单位名称:</div>
<Cascader :form="searchParams" id="dwCode" width="9.6875"></Cascader>
<Cascader :form="searchParams" id="dwCode" width="9.6875" :props="props"></Cascader>
</div>
<div class="search-item">
<div class="label">组角色:</div>
......@@ -784,6 +784,13 @@ export default {
}
};
return {
props: {
value: "code",
label: "key",
children: "childCodeDwXz",
checkStrictly: true,
emitPath: false,
},
width5: "",
sWidth: 50,
width3: 90,
......
......@@ -50,6 +50,7 @@
:form="userSearchParams"
id="unitCode"
width="9.6875"
:props="props"
></Cascader>
</div>
<div class="search-item">
......@@ -582,6 +583,13 @@ export default {
},
data() {
return {
props: {
value: "code",
label: "key",
children: "childCodeDwXz",
checkStrictly: true,
emitPath: false,
},
key1: 1,
key2: 0,
isUser: false,
......
......@@ -32,7 +32,7 @@
</div>
<div class="search-item">
<div class="label">单位:</div>
<Cascader :form="searchParams" id="unitCode" width="9.6875"></Cascader>
<Cascader :form="searchParams" id="unitCode" width="9.6875" :props="props"></Cascader>
</div>
<div class="search-item">
<div class="label">角色:</div>
......@@ -72,7 +72,11 @@
<el-checkbox v-model="checked" style="margin-right: 0.625rem"
>停用</el-checkbox
>
<div class="btn1 f-default-button" @click="delMore()" v-if="roleArr.includes('H-1-1')">
<div
class="btn1 f-default-button"
@click="delMore()"
v-if="roleArr.includes('H-1-1')"
>
删除
</div>
<div class="add f-youling-button" @click="open">
......@@ -94,7 +98,7 @@
>
<i
class="iconfont icon-tanhao1"
style="color: #055fe7; font-size: 1rem; margin: 0 0.625rem;"
style="color: #055fe7; font-size: 1rem; margin: 0 0.625rem"
></i>
已选择
<span style="color: #055fe7">{{ multipleSelection.length }}</span> 项​
......@@ -325,7 +329,11 @@
></el-input>
</el-form-item>
<el-form-item class="info-item" label="所属单位:" prop="unitCode">
<Cascader :form="addFormParams" id="unitCode"></Cascader>
<Cascader
:form="addFormParams"
id="unitCode"
:props="props"
></Cascader>
</el-form-item>
<el-form-item class="info-item" label="用户警号:" prop="policeNumber">
<el-input
......@@ -447,7 +455,11 @@
></el-input>
</el-form-item>
<el-form-item class="info-item" label="所属单位:" prop="unitCode">
<Cascader :form="editFormParams" id="unitCode"></Cascader>
<Cascader
:form="editFormParams"
id="unitCode"
:props="props"
></Cascader>
</el-form-item>
<el-form-item class="info-item" label="用户警号:" prop="policeNumber">
<el-input
......@@ -656,6 +668,13 @@ export default {
width1: 100,
height: "33rem",
sWidth: 50,
props: {
value: "code",
label: "key",
children: "childCodeDwXz",
checkStrictly: true,
emitPath: false,
},
// 新增对象
addFormParams: {
idCard: "",
......
......@@ -225,7 +225,6 @@ export default {
this.$message.success('登录成功!')
//所在单位数据
this.$store.dispatch("publicData/_getList");
this.$store.dispatch("ljk/_ljkRy") // 获取用户人员逻辑库JSON
this.$store.dispatch("ljk/_ljkAj") // 获取用户案件逻辑库JSON
this.$store.dispatch("ljk/_ljkAll") // 获取用户所有逻辑库名称NAME
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment