临时提交

This commit is contained in:
648540858
2024-07-30 17:58:18 +08:00
parent 112cb2dfd8
commit 3ce973d2ee
17 changed files with 237 additions and 46 deletions

View File

@@ -4,9 +4,10 @@
<div class="page-title">行政区划</div>
<div class="page-header-btn">
<div style="display: inline;">
<el-input @input="search" style="margin-right: 1rem; width: auto;" size="mini" placeholder="关键字"
<el-input @input="search" style="margin-right: 1rem; width: 12rem;" size="mini" placeholder="关键字"
prefix-icon="el-icon-search" v-model="searchSrt" clearable></el-input>
<el-checkbox v-model="showCode">显示编号</el-checkbox>
</div>
</div>
</div>
@@ -28,9 +29,9 @@
<el-radio v-if="node.data.type === 0 && node.level !== 1 " style="margin-right: 0" v-model="chooseId" @input="chooseIdChange" :label="node.data.id">{{''}}</el-radio>
</span>
<span v-if="node.data.type === 0" style="color: #409EFF" class="iconfont icon-bianzubeifen3"></span>
<span v-if="node.data.type === 1" style="color: #409EFF" class="iconfont icon-file-stream2"></span>
<span style=" padding-left: 1px" v-if="node.data.id !==''">{{ node.label }}({{ node.data.id }})</span>
<span style=" padding-left: 1px" v-if="node.data.id ===''">{{ node.label }}</span>
<span v-if="node.data.type === 1" style="color: #409EFF" class="iconfont icon-shexiangtou2"></span>
<span style=" padding-left: 1px" v-if="node.data.id !=='' && showCode">{{ node.label }}-{{ node.data.id }}</span>
<span style=" padding-left: 1px" v-if="node.data.id ==='' || !showCode">{{ node.label }}</span>
</span>
</vue-easy-tree>
</div>
@@ -51,6 +52,7 @@ export default {
},
data() {
return {
showCode: false,
searchSrt: "",
chooseId: "",
// props: {
@@ -201,9 +203,11 @@ export default {
disabled: false,
onClick: () => {
this.$axios({
method: "delete",
url: "/api/platform/catalog/relation/del",
data: data
method: "post",
url: `/api/common/channel/region/delete`,
data: {
channelIds: [data.id]
}
}).then((res) => {
console.log("移除成功")
node.parent.loaded = false

View File

@@ -54,8 +54,8 @@
<el-table-column label="添加状态" min-width="100">
<template slot-scope="scope">
<div slot="reference" class="name-wrapper">
<el-tag size="medium" v-if="scope.row.civilCode">已添加({{scope.row.civilCode}})</el-tag>
<el-tag size="medium" type="info" v-if="!scope.row.civilCode">未添加</el-tag>
<el-tag size="medium" v-if="scope.row.gbCivilCode">已添加-{{scope.row.gbCivilCode}}</el-tag>
<el-tag size="medium" type="info" v-if="!scope.row.gbCivilCode">未添加</el-tag>
</div>
</template>
</el-table-column>
@@ -93,7 +93,7 @@ export default {
searchSrt: "",
channelType: "",
online: "",
hasCivilCode: "",
hasCivilCode: "false",
winHeight: window.innerHeight - 180,
currentPage: 1,
count: 15,
@@ -150,7 +150,7 @@ export default {
this.multipleSelection = val;
},
selectable: function (row, rowIndex) {
if (row.civilCode) {
if (row.gbCivilCode) {
return false
}else {
return true
@@ -159,15 +159,36 @@ export default {
add: function (row) {
if (!this.regionId) {
this.$message.info("请选择左侧行政区划节点")
return;
}
console.log(this.regionId)
console.log(this.multipleSelection)
let channels = []
for (let i = 0; i < this.multipleSelection.length; i++) {
channels.push(this.multipleSelection[i].gbId)
}
console.log(channels)
if (channels.length === 0) {
this.$message.info("请选择右侧通道")
return;
}
this.loading = true
this.$axios({
method: 'post',
url: `/api/common/channel/region/add`,
data: {
civilCode: this.regionId,
channelIds: channels
}
}).then((res)=> {
if (res.data.code === 0) {
this.$message.success("保存成功")
}else {
this.$message.error(res.data.msg)
}
this.loading = false
}).catch((error)=> {
this.$message.error(error)
this.loading = false
});
},
remove: function (row) {
},