Commit 9616571b authored by “yiyousong”'s avatar “yiyousong”

perf: 优化

parent 0ffce21d
......@@ -77,8 +77,8 @@
</div>
</div>
</template>
<script>
<script>
import {
addMatterInternet,
getMatterInternetList,
......@@ -128,7 +128,10 @@ export default {
}
},
async handleSave() {
console.log(this.arrType);
if (!local.getLocal("matter")) {
this.$message.warning("请先新增基本信息");
return;
}
let arr = this.arrType.filter((v) => v);
arr.forEach((v) => {
local.getLocal("matter").matterName
......@@ -140,7 +143,6 @@ export default {
: (v.matterId = "");
});
let res = await addMatterInternet(arr);
console.log(res);
let { code, msg } = res.data;
if (code == 1) {
this.$message.success(msg);
......@@ -149,22 +151,23 @@ export default {
}
},
async getList() {
let res = await getMatterInternetList({
matterId: local.getLocal("matter").id,
});
let { code, data } = res.data;
if (code == 1) {
this.arrType = data.data;
} else {
this.arrType = [];
if (local.getLocal("matter")) {
let res = await getMatterInternetList({
matterId: local.getLocal("matter").id,
});
let { code, data } = res.data;
if (code == 1) {
this.arrType = data.data;
} else {
this.arrType = [];
}
}
console.log(res);
},
},
};
</script>
<style lang="less" scoped>
<style lang="less" scoped>
.basicset-tab4 {
width: 100%;
height: 100%;
......@@ -235,4 +238,3 @@ export default {
}
}
</style>
\ No newline at end of file
......@@ -114,8 +114,15 @@ export default {
dataIndex: "orgCode",
},
{
title: "备注",
dataIndex: "remark",
title: "状态",
dataIndex: "enabled",
customRender: (text) => {
if (text === 1) {
return <a-tag color="green">启用</a-tag>;
} else if (text === 0) {
return <a-tag color="red">停用</a-tag>;
}
},
},
{
title: "操作",
......
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