|
|
@ -1,36 +1,39 @@ |
|
|
|
<template> |
|
|
|
<div class="g-main"> |
|
|
|
<div class="m-search"> |
|
|
|
<el-form :inline="true" |
|
|
|
<el-form |
|
|
|
:inline="true" |
|
|
|
:model="formData" |
|
|
|
ref="ref_searchform" |
|
|
|
:label-width="'120px'"> |
|
|
|
<el-form-item label="标签名称" |
|
|
|
prop="tagName"> |
|
|
|
<el-input v-model="formData.tagName" |
|
|
|
:label-width="'120px'" |
|
|
|
> |
|
|
|
<el-form-item label="标签名称" prop="tagName"> |
|
|
|
<el-input |
|
|
|
v-model="formData.tagName" |
|
|
|
size="small" |
|
|
|
class="u-item-width-normal" |
|
|
|
clearable |
|
|
|
placeholder="请输入"> |
|
|
|
placeholder="请输入" |
|
|
|
> |
|
|
|
</el-input> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
<el-row type="flex"> |
|
|
|
<el-col :span="24" align="right"> |
|
|
|
<el-button style="margin-left:30px" |
|
|
|
<el-button |
|
|
|
style="margin-left: 30px" |
|
|
|
size="small" |
|
|
|
type="primary " |
|
|
|
@click="handleSearchFrom">查询</el-button> |
|
|
|
@click="handleSearchFrom" |
|
|
|
>查询</el-button |
|
|
|
> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
<div class="m-table"> |
|
|
|
<div class="div_btn"> |
|
|
|
<el-button |
|
|
|
style="height:32px;" |
|
|
|
style="height: 32px" |
|
|
|
size="small" |
|
|
|
@click="handleAdd({}, 'add')" |
|
|
|
type="primary" |
|
|
@ -65,22 +68,17 @@ |
|
|
|
> |
|
|
|
<!-- 按钮权限--> |
|
|
|
<template> |
|
|
|
|
|
|
|
<el-popconfirm |
|
|
|
title="删除之后无法回复,确认删除?" |
|
|
|
@onConfirm="handleDel(scope.row)" |
|
|
|
> |
|
|
|
<el-button |
|
|
|
size="small" |
|
|
|
type="text" |
|
|
|
slot="reference" |
|
|
|
<el-button size="small" type="text" slot="reference" |
|
|
|
>删除</el-button |
|
|
|
> |
|
|
|
</el-popconfirm> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
<div class="div-flex"> |
|
|
@ -98,23 +96,24 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-dialog :visible.sync="formShow" |
|
|
|
<el-dialog |
|
|
|
:visible.sync="formShow" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:close-on-press-escape="false" |
|
|
|
:title="formTitle" |
|
|
|
destroy-on-close |
|
|
|
width="900px" |
|
|
|
width="950px" |
|
|
|
top="5vh" |
|
|
|
class="dialog-h" |
|
|
|
@closed="diaClose" |
|
|
|
|
|
|
|
> |
|
|
|
<add-form |
|
|
|
v-if="formShow" |
|
|
|
ref="Config_form" |
|
|
|
:row-obj="rowObj" |
|
|
|
@dialogCancle="addFormCancle" |
|
|
|
@dialogOk="addFormOk"></add-form> |
|
|
|
@dialogOk="addFormOk" |
|
|
|
></add-form> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
@ -122,13 +121,13 @@ |
|
|
|
<script> |
|
|
|
import { requestPost } from "@/js/dai/request"; |
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
import addForm from "./addForm.vue" |
|
|
|
import addForm from "./addForm.vue"; |
|
|
|
export default { |
|
|
|
name: "labelConfig", |
|
|
|
data() { |
|
|
|
return { |
|
|
|
formData: { |
|
|
|
tagName:"" |
|
|
|
tagName: "", |
|
|
|
}, |
|
|
|
tableData: [], |
|
|
|
pageNo: 1, |
|
|
@ -138,83 +137,80 @@ export default { |
|
|
|
searchH: 115, |
|
|
|
formShow: false, |
|
|
|
formTitle: "", |
|
|
|
rowObj:{} |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
created(){ |
|
|
|
rowObj: {}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() {}, |
|
|
|
components: { addForm }, |
|
|
|
methods: { |
|
|
|
async getlabelConfigList() { |
|
|
|
const url = "/governance/resiSearchTag/listResiSearchTags" |
|
|
|
const url = "/governance/resiSearchTag/listResiSearchTags"; |
|
|
|
let params = { |
|
|
|
pageNo: this.pageNo, |
|
|
|
pageSize: this.pageSize, |
|
|
|
tagName:this.formData.tagName |
|
|
|
} |
|
|
|
let {data,msg,code} = await requestPost(url,params) |
|
|
|
this.tableLoading = false |
|
|
|
tagName: this.formData.tagName, |
|
|
|
}; |
|
|
|
let { data, msg, code } = await requestPost(url, params); |
|
|
|
this.tableLoading = false; |
|
|
|
if (code == 0) { |
|
|
|
this.tableData = data.list |
|
|
|
this.total = data.total |
|
|
|
this.tableData = data.list; |
|
|
|
this.total = data.total; |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
addFormCancle() { |
|
|
|
this.formShow = false |
|
|
|
this.formShow = false; |
|
|
|
}, |
|
|
|
addFormOk() { |
|
|
|
this.formShow = false |
|
|
|
this.getlabelConfigList() |
|
|
|
this.formShow = false; |
|
|
|
this.getlabelConfigList(); |
|
|
|
}, |
|
|
|
handleAdd(row, type) { |
|
|
|
if (type == "add") { |
|
|
|
this.formTitle = '新增标签' |
|
|
|
this.formShow = true |
|
|
|
this.formTitle = "新增标签"; |
|
|
|
this.formShow = true; |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.Config_form.initForm(type, row) |
|
|
|
}) |
|
|
|
this.$refs.Config_form.initForm(type, row); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.formTitle = '修改标签' |
|
|
|
this.formShow = true |
|
|
|
this.formTitle = "修改标签"; |
|
|
|
this.formShow = true; |
|
|
|
console.log(row); |
|
|
|
this.rowObj = row |
|
|
|
this.rowObj = row; |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.Config_form.initForm(type, row) |
|
|
|
}) |
|
|
|
this.$refs.Config_form.initForm(type, row); |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
handleSizeChange(val) { |
|
|
|
console.log(`每页 ${val} 条`); |
|
|
|
this.pageSize = val; |
|
|
|
this.getlabelConfigList() |
|
|
|
this.getlabelConfigList(); |
|
|
|
}, |
|
|
|
async handleDel(row) { |
|
|
|
const url = `/governance/resiSearchTag/deleteResiSearchTag/${row.tagId}` |
|
|
|
let {code,msg} = await requestPost(url) |
|
|
|
const url = `/governance/resiSearchTag/deleteResiSearchTag/${row.tagId}`; |
|
|
|
let { code, msg } = await requestPost(url); |
|
|
|
if (code == 0) { |
|
|
|
this.$message.success('删除成功') |
|
|
|
this.$message.success("删除成功"); |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
|
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
this.getlabelConfigList() |
|
|
|
this.getlabelConfigList(); |
|
|
|
}, |
|
|
|
handleSearchFrom() { |
|
|
|
this.getlabelConfigList() |
|
|
|
this.getlabelConfigList(); |
|
|
|
}, |
|
|
|
handleCurrentChange(val) { |
|
|
|
this.pageNo = val; |
|
|
|
this.getlabelConfigList(); |
|
|
|
}, |
|
|
|
diaClose() { |
|
|
|
this.formShow = false |
|
|
|
this.formShow = false; |
|
|
|
}, |
|
|
|
}, |
|
|
|
async mounted() { |
|
|
|
this.getlabelConfigList() |
|
|
|
this.getlabelConfigList(); |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapGetters(["clientHeight", "iframeHeight"]), |
|
|
@ -224,12 +220,15 @@ export default { |
|
|
|
return this.$store.state.inIframe ? h : _h; |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch:{} |
|
|
|
} |
|
|
|
watch: {}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|
@import "@/assets/scss/modules/management/list-main.scss"; |
|
|
|
.div_btn { |
|
|
|
margin-bottom: 12px; |
|
|
|
} |
|
|
|
.dialog-h{ |
|
|
|
padding: 0 50px; |
|
|
|
} |
|
|
|
</style> |
|
|
|