Browse Source

差不多了

feature
dai 3 years ago
parent
commit
c210e69f4a
  1. 17
      src/views/modules/base/epidemic/natFocus/natFocusList.vue
  2. 18
      src/views/modules/base/epidemic/natFocus/natFocusListHistory.vue

17
src/views/modules/base/epidemic/natFocus/natFocusList.vue

@ -262,6 +262,7 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<a <a
style="cursor: pointer"
v-if="scope.row.userId" v-if="scope.row.userId"
@click="handleWatchPeopleInfo(scope.$index)" @click="handleWatchPeopleInfo(scope.$index)"
>{{ scope.row.name }}</a >{{ scope.row.name }}</a
@ -310,6 +311,9 @@
label="隔离状态" label="隔离状态"
width="180" width="180"
> >
<template slot-scope="scope">
{{ optionsDict.isolatedState[scope.row.isolatedState] || "--" }}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -546,6 +550,9 @@ export default {
options: { options: {
isolatedState: [], isolatedState: [],
}, },
optionsDict: {
isolatedState: {},
},
optionsV: [], optionsV: [],
optionsB: [], optionsB: [],
@ -594,11 +601,11 @@ export default {
this.natNumList.push(obj); this.natNumList.push(obj);
} }
await this.loadTable(); await this.getFmOptions("isolatedState", "/sys/dict/data/dictlist", {
this.getFmOptions("isolatedState", "/sys/dict/data/dictlist", {
dictType: "isolatedState", dictType: "isolatedState",
}); });
await this.loadTable();
}, },
methods: { methods: {
@ -618,6 +625,10 @@ export default {
if (code === 0) { if (code === 0) {
this.options[field] = this.options[field] =
typeof cookFn == "function" ? cookFn(data) : data || []; typeof cookFn == "function" ? cookFn(data) : data || [];
this.options[field].forEach((item) => {
this.optionsDict[field][item.value] = item.label;
});
console.log("红红火火恍恍惚惚或或或或或或或或", this.optionsDict);
} else { } else {
this.$message.error("请求基础数据失败!"); this.$message.error("请求基础数据失败!");
} }

18
src/views/modules/base/epidemic/natFocus/natFocusListHistory.vue

@ -190,7 +190,6 @@
@select-all="handleSelAll" @select-all="handleSelAll"
style="width: 100%" style="width: 100%"
> >
<!-- <el-table-column type="selection" width="55"></el-table-column> -->
<el-table-column <el-table-column
label="序号" label="序号"
header-align="center" header-align="center"
@ -208,6 +207,7 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<a <a
style="cursor: pointer"
v-if="scope.row.userId" v-if="scope.row.userId"
@click="handleWatchPeopleInfo(scope.$index)" @click="handleWatchPeopleInfo(scope.$index)"
>{{ scope.row.name }}</a >{{ scope.row.name }}</a
@ -256,6 +256,9 @@
label="隔离状态" label="隔离状态"
width="180" width="180"
> >
<template slot-scope="scope">
{{ optionsDict.isolatedState[scope.row.isolatedState] || "--" }}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -485,6 +488,9 @@ export default {
options: { options: {
isolatedState: [], isolatedState: [],
}, },
optionsDict: {
isolatedState: {},
},
optionsV: [], optionsV: [],
optionsB: [], optionsB: [],
@ -533,11 +539,11 @@ export default {
this.natNumList.push(obj); this.natNumList.push(obj);
} }
await this.loadTable(); await this.getFmOptions("isolatedState", "/sys/dict/data/dictlist", {
this.getFmOptions("isolatedState", "/sys/dict/data/dictlist", {
dictType: "isolatedState", dictType: "isolatedState",
}); });
await this.loadTable();
}, },
methods: { methods: {
@ -557,6 +563,10 @@ export default {
if (code === 0) { if (code === 0) {
this.options[field] = this.options[field] =
typeof cookFn == "function" ? cookFn(data) : data || []; typeof cookFn == "function" ? cookFn(data) : data || [];
this.options[field].forEach((item) => {
this.optionsDict[field][item.value] = item.label;
});
console.log("红红火火恍恍惚惚或或或或或或或或", this.optionsDict);
} else { } else {
this.$message.error("请求基础数据失败!"); this.$message.error("请求基础数据失败!");
} }

Loading…
Cancel
Save