席位,工单,特征库
This commit is contained in:
@@ -7,19 +7,25 @@
|
|||||||
<template #content>
|
<template #content>
|
||||||
<ai-search-bar>
|
<ai-search-bar>
|
||||||
<template #left>
|
<template #left>
|
||||||
<ai-select v-model="search.integralType" placeholder="请选择机位" @change="current=1, getTableData()"
|
<el-select v-model="configInfo.id" filterable placeholder="请选择机位" size="small" @change="configChange">
|
||||||
:selectList="dict.getDict('integralType')"/>
|
<el-option
|
||||||
<span class="tips">当前机位1有效期为:2024-06-24 ip地址为:192.168.1.120</span>
|
v-for="item in configList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<span class="tips">当前机位1有效期为:{{configInfo.validity}} ip地址为:{{configInfo.xbotIp}}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #right>
|
<template #right>
|
||||||
<el-button size="small" type="primary" @click="add('')">启动</el-button>
|
<el-button size="small" :type="configInfo.status == 1 ? 'info' : 'primary'" @click="openWechat()" :disabled="configInfo.status == 1">启动</el-button>
|
||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
<ai-table :tableData="tableData" :total="total" :current.sync="current" :size.sync="size"
|
<ai-table :tableData="tableData" :total="total" :current.sync="search.current" :size.sync="search.size"
|
||||||
@getList="getTableData()" :col-configs="colConfigs" :dict="dict">
|
@getList="getTableData()" :col-configs="colConfigs">
|
||||||
<el-table-column slot="num" label="监控群聊" align="center">
|
<el-table-column slot="groupCount" label="监控群聊" align="center">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<div @click="showDialog(row)" style="cursor: pointer;">110</div>
|
<div @click="showDialog(row)" style="cursor: pointer;color:#26f">{{row.groupCount}}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</ai-table>
|
</ai-table>
|
||||||
@@ -30,8 +36,10 @@
|
|||||||
:visible.sync="dialog"
|
:visible.sync="dialog"
|
||||||
:destroyOnClose="true"
|
:destroyOnClose="true"
|
||||||
width="720px"
|
width="720px"
|
||||||
@closed="form={}" :customFooter="false">
|
@closed="dialog=false" :customFooter="false">
|
||||||
|
<ai-table :tableData="tableDataGroup" :total="totalGroup" :current.sync="searchGroup.current" :size.sync="searchGroup.size"
|
||||||
|
@getList="getTableDataGroup()" :col-configs="colConfigsGroup">
|
||||||
|
</ai-table>
|
||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -51,55 +59,78 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
search: {
|
search: {
|
||||||
wordName: '',
|
|
||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
},
|
},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
size: 10,
|
|
||||||
total: 0,
|
total: 0,
|
||||||
current: 1,
|
|
||||||
form: {
|
|
||||||
wordName: '',
|
|
||||||
// areaList: [],
|
|
||||||
deptList: [],
|
|
||||||
},
|
|
||||||
dialog: false,
|
dialog: false,
|
||||||
flag: false,
|
configList: [],
|
||||||
|
configId: '',
|
||||||
|
configInfo: {id: ''},
|
||||||
|
groupInfo: {},
|
||||||
|
searchGroup: {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
},
|
||||||
|
tableDataGroup: [],
|
||||||
|
totalGroup: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$dict.load('integralType')
|
this.getConfigList()
|
||||||
this.getTableData()
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['user']),
|
...mapState(['user']),
|
||||||
colConfigs() {
|
colConfigs() {
|
||||||
return [
|
return [
|
||||||
{ prop: "wordName", label: '姓名', align: "left"},
|
{ slot: "loginUserId", label: '用户id'},
|
||||||
{ prop: "createTime", label: '手机号'},
|
{ prop: "loginUserName", label: '姓名', align: "left"},
|
||||||
{ prop: "createUserName", label: '管辖区域'},
|
{ prop: "phone", label: '手机号'},
|
||||||
{ slot: "num", label: '监控群聊'},
|
{ prop: "girdNames", label: '管辖区域'},
|
||||||
{ prop: "departmentNames", label: '状态'},
|
{ slot: "groupCount", label: '监控群聊'},
|
||||||
|
// { prop: "status", label: '状态'},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
rules() {
|
colConfigsGroup() {
|
||||||
return {
|
return [
|
||||||
wordName: [{required: true, message: '请输入敏感词', trigger: 'blur' }],
|
{ prop: "nickname", label: '群名称'},
|
||||||
// areaList: [{required: true, message: '请选择生效地区', trigger: 'blur' }],
|
// { prop: "phone", label: '群主'},
|
||||||
deptList: [{required: true, message: '请选择生效部门', trigger: 'blur' }],
|
]
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getConfigList() {
|
||||||
|
this.instance.post(`/app/appxbotconfig/list?size=1000`).then(res => {
|
||||||
|
if(res?.data) {
|
||||||
|
res.data.records.map((item) => {
|
||||||
|
item.label = item.xbotName
|
||||||
|
item.value = item.id
|
||||||
|
})
|
||||||
|
this.configList = res.data.records
|
||||||
|
this.configInfo = this.configList[0]
|
||||||
|
this.getTableData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
configChange(e) {
|
||||||
|
this.configInfo = this.configList.filter(item => item.id == e)[0]
|
||||||
|
this.search.current = 1
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
openWechat() {
|
||||||
|
this.instance.post(`/app/appxbotconfig/openWechat?id=${this.configInfo.id}`).then(res => {
|
||||||
|
if(res.code === 0) {
|
||||||
|
this.configInfo.status = 1
|
||||||
|
this.$message.success('启动成功!')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
getTableData() {
|
getTableData() {
|
||||||
this.instance.post(`/app/appsessionarchivekeywordinfo/list`,null,{
|
this.instance.post(`/app/xbotCallback/list`,null,{
|
||||||
params: {
|
params: {
|
||||||
...this.search,
|
...this.search,
|
||||||
current: this.current,
|
xbotId: this.configInfo.id
|
||||||
size: this.size,
|
|
||||||
total: this.total,
|
|
||||||
wordName: this.search.name
|
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res?.data) {
|
if(res?.data) {
|
||||||
@@ -108,22 +139,24 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeStatus(row, text, status) {
|
|
||||||
this.$confirm(`确定${text}该关键词?`).then(() => {
|
|
||||||
this.instance.post(`/app/appsessionarchivekeywordinfo/updateStatusById?id=${row.id}&status=${status}`).then(res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.$message.success('操作成功!')
|
|
||||||
this.getTableData()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
showDialog(row) {
|
showDialog(row) {
|
||||||
this.form = {...row}
|
|
||||||
this.form.deptList = []
|
|
||||||
// this.form.areaList = this.form.areaIds.split(',')
|
|
||||||
this.form.deptList = row.departmentIds.split(',')
|
|
||||||
this.dialog = true
|
this.dialog = true
|
||||||
|
this.groupInfo = row
|
||||||
|
this.getTableDataGroup()
|
||||||
|
},
|
||||||
|
getTableDataGroup() {
|
||||||
|
this.instance.post(`/app/xbotCallback/groupList`,null,{
|
||||||
|
params: {
|
||||||
|
...this.searchGroup,
|
||||||
|
managerWxid: this.groupInfo.loginUserId
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if(res?.data) {
|
||||||
|
this.tableDataGroup = res.data.records
|
||||||
|
this.totalGroup = res.data.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
<ai-info-item label="当前状态" :value="dict.getLabel('clapEventStatus', detail.eventStatus)"></ai-info-item>
|
<ai-info-item label="当前状态" :value="dict.getLabel('clapEventStatus', detail.eventStatus)"></ai-info-item>
|
||||||
<ai-info-item label="联系方式">{{ detail.phone }}</ai-info-item>
|
<ai-info-item label="联系方式">{{ detail.phone }}</ai-info-item>
|
||||||
<ai-info-item label="上报时间">{{ detail.createTime }}</ai-info-item>
|
<ai-info-item label="上报时间">{{ detail.createTime }}</ai-info-item>
|
||||||
<ai-info-item label="事件来源">{{ dict.getLabel('residentEventSource', detail.eventSource) }}</ai-info-item>
|
<!-- <ai-info-item label="事件来源">{{ dict.getLabel('residentEventSource', detail.eventSource) }}</ai-info-item> -->
|
||||||
<ai-info-item label="事件类型">{{ detail.groupName }}</ai-info-item>
|
<ai-info-item label="事件类型">{{ detail.flName }}</ai-info-item>
|
||||||
<ai-info-item label="事件描述" isLine>{{ detail.content }}</ai-info-item>
|
<ai-info-item label="事件描述" isLine>{{ detail.content }}</ai-info-item>
|
||||||
<ai-info-item label="现场照片" isLine>
|
<ai-info-item label="现场照片" isLine>
|
||||||
<ai-uploader :instance="instance" disabled v-model="detail.files"></ai-uploader>
|
<ai-uploader :instance="instance" disabled v-model="detail.files"></ai-uploader>
|
||||||
@@ -218,7 +218,7 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getDetail() {
|
getDetail() {
|
||||||
this.instance.post('/app/appresidentreportinfo/queryDetailById', null, {
|
this.instance.post('/app/appsessionarchivereportinfo/queryDetailById', null, {
|
||||||
params: {id: this.$route.query.id}
|
params: {id: this.$route.query.id}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
@@ -290,7 +290,7 @@ export default {
|
|||||||
onForwardConfirm() {
|
onForwardConfirm() {
|
||||||
this.$refs.forwardForm.validate(v => {
|
this.$refs.forwardForm.validate(v => {
|
||||||
if (v) {
|
if (v) {
|
||||||
this.instance.post('/app/appresidentreportinfo/transfer', {
|
this.instance.post('/app/appsessionarchivereportinfo/transfer', {
|
||||||
...this.forwardForm,
|
...this.forwardForm,
|
||||||
id: this.$route.query.id
|
id: this.$route.query.id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@@ -388,7 +388,7 @@ export default {
|
|||||||
handleEvent() {
|
handleEvent() {
|
||||||
this.$refs.form.validate(v => {
|
this.$refs.form.validate(v => {
|
||||||
if (v) {
|
if (v) {
|
||||||
this.instance.post('/app/appresidentreportinfo/finishByGirdMember', {
|
this.instance.post('/app/appsessionarchivereportinfo/finish', {
|
||||||
...this.form,
|
...this.form,
|
||||||
groupName: this.dictList.filter(v => v.dictValue === this.form.groupId)[0].dictName,
|
groupName: this.dictList.filter(v => v.dictValue === this.form.groupId)[0].dictName,
|
||||||
id: this.$route.query.id
|
id: this.$route.query.id
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ import {mapState} from 'vuex'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'List',
|
name: 'List',
|
||||||
label: "随手拍",
|
label: "工单管理",
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
@@ -111,8 +111,7 @@ export default {
|
|||||||
colConfigs() {
|
colConfigs() {
|
||||||
return [
|
return [
|
||||||
{prop: 'content', label: '内容描述', width: '300px'},
|
{prop: 'content', label: '内容描述', width: '300px'},
|
||||||
{prop: 'eventSource', label: '事件来源', align: 'center', dict: 'residentEventSource'},
|
{prop: 'flName', label: '事件类型', align: 'center'},
|
||||||
{prop: 'groupName', label: '事件类型', align: 'center'},
|
|
||||||
{prop: 'girdName', label: '所属网格', align: 'center'},
|
{prop: 'girdName', label: '所属网格', align: 'center'},
|
||||||
{prop: 'createTime', label: '上报时间', align: 'center'},
|
{prop: 'createTime', label: '上报时间', align: 'center'},
|
||||||
{prop: 'name', label: '昵称', align: 'center'},
|
{prop: 'name', label: '昵称', align: 'center'},
|
||||||
@@ -131,8 +130,6 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.dict.load('clapEventStatus', 'residentEventSource').then(() => {
|
this.dict.load('clapEventStatus', 'residentEventSource').then(() => {
|
||||||
this.getList()
|
this.getList()
|
||||||
this.getGridList()
|
|
||||||
this.getTypeList()
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -148,43 +145,8 @@ export default {
|
|||||||
this.search.current = 1
|
this.search.current = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
// 所有网格
|
|
||||||
getGridList() {
|
|
||||||
this.instance.post(`/app/appgirdinfo/listAll3`).then((res) => {
|
|
||||||
if (res?.code == 0) {
|
|
||||||
this.girdOptions = this.toTree(res.data)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 转树形结构
|
|
||||||
toTree(data) {
|
|
||||||
let result = [];
|
|
||||||
if (!Array.isArray(data)) {
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
let map = {};
|
|
||||||
data.forEach(item => {
|
|
||||||
map[item.id] = item;
|
|
||||||
});
|
|
||||||
data.forEach(item => {
|
|
||||||
let parent = map[item.parentGirdId];
|
|
||||||
if (parent) {
|
|
||||||
(parent.children || (parent.children = [])).push(item);
|
|
||||||
} else {
|
|
||||||
result.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return result;
|
|
||||||
},
|
|
||||||
gridChange(val) {
|
|
||||||
this.girdArr = val
|
|
||||||
this.search.girdId = val?.[val.length - 1]
|
|
||||||
this.$refs.cascader1.dropDownVisible = false;
|
|
||||||
this.search.current = 1
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
getList() {
|
getList() {
|
||||||
this.instance.post(`/app/appresidentreportinfo/list`, null, {
|
this.instance.post(`/app/appsessionarchivereportinfo/list`, null, {
|
||||||
params: {
|
params: {
|
||||||
...this.search
|
...this.search
|
||||||
}
|
}
|
||||||
@@ -195,7 +157,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
toDetail(id) {
|
toDetail(id) {
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
type: 'Detail',
|
type: 'Detail',
|
||||||
@@ -204,7 +165,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
toSetting() {
|
toSetting() {
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
type: 'Setting',
|
type: 'Setting',
|
||||||
@@ -215,7 +175,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleDelete(ids) {
|
handleDelete(ids) {
|
||||||
this.$confirm("是否要进行删除?").then(() => {
|
this.$confirm("是否要进行删除?").then(() => {
|
||||||
this.instance.post("/app/appresidentreportinfo/delete", null, {
|
this.instance.post("/app/appsessionarchivereportinfo/delete", null, {
|
||||||
params: {ids}
|
params: {ids}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.code == 0) {
|
if (res?.code == 0) {
|
||||||
@@ -225,17 +185,6 @@ export default {
|
|||||||
})
|
})
|
||||||
}).catch(() => 0)
|
}).catch(() => 0)
|
||||||
},
|
},
|
||||||
getTypeList() {
|
|
||||||
this.instance.post(`/app/appresidentreportgroup/list?size=10000`).then(res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
res.data.records.map((item) => {
|
|
||||||
item.dictName = item.groupName
|
|
||||||
item.dictValue = item.id
|
|
||||||
})
|
|
||||||
this.typeList = res.data.records
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,178 +1,190 @@
|
|||||||
<template>
|
<template>
|
||||||
<ai-list class="notice">
|
<section class="Setting">
|
||||||
<template slot="title">
|
<ai-list>
|
||||||
<ai-title isShowBack isShowBottomBorder title="事件类型" @onBackClick="cancel(false)"></ai-title>
|
<template slot="title">
|
||||||
</template>
|
<ai-title title="工单特征库" isShowBack isShowBottomBorder @onBackClick="cancel"></ai-title>
|
||||||
<template slot="content">
|
</template>
|
||||||
<ai-search-bar class="search-bar">
|
<template #content>
|
||||||
<template #left>
|
<ai-search-bar>
|
||||||
<el-button size="small" type="primary" icon="iconfont iconAdd" @click="isShowAdd = true">添加事件类型</el-button>
|
<template #left>
|
||||||
</template>
|
<el-button size="small" type="primary" icon="iconfont iconAdd" @click="add('')">添加</el-button>
|
||||||
<template slot="right">
|
|
||||||
<el-input
|
|
||||||
v-model="search.groupName"
|
|
||||||
class="search-input"
|
|
||||||
size="small"
|
|
||||||
v-throttle="() => {search.current = 1, getList()}"
|
|
||||||
placeholder="请输入事件类型名称"
|
|
||||||
clearable
|
|
||||||
@change="getList"
|
|
||||||
@clear="search.current = 1, search.groupName = '', getList()"
|
|
||||||
suffix-icon="iconfont iconSearch">
|
|
||||||
</el-input>
|
|
||||||
</template>
|
|
||||||
</ai-search-bar>
|
|
||||||
<ai-table
|
|
||||||
:tableData="tableData"
|
|
||||||
:col-configs="colConfigs"
|
|
||||||
:total="total"
|
|
||||||
style="margin-top: 6px;"
|
|
||||||
:current.sync="search.current"
|
|
||||||
:size.sync="search.size"
|
|
||||||
@getList="getList">
|
|
||||||
<el-table-column slot="tags" label="标签">
|
|
||||||
<template slot-scope="{ row }">
|
|
||||||
<div class="table-tags">
|
|
||||||
<el-tag type="info" v-for="(item, index) in row.tags" size="small" :key="index">{{ item }}</el-tag>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
<template #right>
|
||||||
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
|
<el-input size="small" placeholder="特征词搜索" v-model="search.wordName" clearable
|
||||||
<div class="table-options" slot-scope="{ row }">
|
@clear="search.current = 1, search.wordName = '', getTableData()" suffix-icon="iconfont iconSearch"
|
||||||
<el-button type="text" @click="edit(row)">编辑</el-button>
|
v-throttle="() => {(search.current = 1), getTableData();}"/>
|
||||||
<el-button type="text" @click="remove(row.id)">删除</el-button>
|
</template>
|
||||||
</div>
|
</ai-search-bar>
|
||||||
</el-table-column>
|
<ai-table :tableData="tableData" :total="total" :current.sync="search.current" :size.sync="search.size"
|
||||||
</ai-table>
|
@getList="getTableData()" :col-configs="colConfigs" :dict="dict">
|
||||||
<ai-dialog
|
<el-table-column slot="options" label="操作" align="center">
|
||||||
:visible.sync="isShowAdd"
|
<template slot-scope="{ row }">
|
||||||
width="780px"
|
<el-button type="text" @click="changeStatus(row, '停用')" v-if="row.status == 1">停用</el-button>
|
||||||
height="580px"
|
<el-button type="text" @click="changeStatus(row, '启用')" v-else>启用</el-button>
|
||||||
:title="id ? '编辑事件类型' : '添加事件类型'"
|
<el-button type="text" @click="edit(row)">编辑</el-button>
|
||||||
@close="onClose"
|
<el-button type="text" @click="del(row)">删除</el-button>
|
||||||
@onConfirm="onConfirm">
|
</template>
|
||||||
<el-form ref="form" class="ai-form" :model="form" label-width="110px" label-position="right">
|
</el-table-column>
|
||||||
<el-form-item label="事件类型" prop="groupName" style="width: 100%;" :rules="[{ required: true, message: '请输入事件类型名称', trigger: 'blur' }]">
|
</ai-table>
|
||||||
<el-input size="small" :maxlength="10" show-word-limit placeholder="请输入事件类型名称" v-model="form.groupName"></el-input>
|
</template>
|
||||||
</el-form-item>
|
</ai-list>
|
||||||
<el-form-item label="排序" prop="showIndex" style="width: 100%;" :rules="[{ required: true, message: '请输入排序', trigger: 'blur' }]">
|
<ai-dialog
|
||||||
<el-input-number size="small" v-model="form.showIndex" :min="1" :max="100" label="请输入排序"></el-input-number>
|
:title="form.id ? '编辑特征词' : '添加特征词'"
|
||||||
</el-form-item>
|
:visible.sync="dialog"
|
||||||
</el-form>
|
:destroyOnClose="true"
|
||||||
</ai-dialog>
|
width="720px"
|
||||||
</template>
|
@onConfirm="onConfirm"
|
||||||
</ai-list>
|
@closed="form={}">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="特征词" prop="wordName">
|
||||||
|
<el-input v-model.trim="form.wordName" type="textarea" :rows="2" placeholder="多个特征词以;隔开"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</ai-dialog>
|
||||||
|
</section>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from "vuex";
|
||||||
export default {
|
export default {
|
||||||
name: 'List',
|
name: "Setting",
|
||||||
|
label: '工单特征库',
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object
|
dict: Object,
|
||||||
|
permissions: Function,
|
||||||
|
menuName:String
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
search: {
|
||||||
|
wordName: '',
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
},
|
||||||
|
tableData: [],
|
||||||
|
current: 1,
|
||||||
|
form: {
|
||||||
|
wordName: '',
|
||||||
|
},
|
||||||
|
dialog: false,
|
||||||
|
flag: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.dict.load(['processDefStatus']).then(() => {
|
||||||
|
this.getTableData()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['user']),
|
||||||
|
colConfigs() {
|
||||||
|
return [
|
||||||
|
{ prop: "wordName", label: '特征词', align: "left"},
|
||||||
|
{ prop: "createTime", label: '创建时间', width: 200},
|
||||||
|
{ prop: "createUserName", label: '创建人', width: 200},
|
||||||
|
{ prop: "status", label: '状态', width: 200, dict: 'processDefStatus'},
|
||||||
|
{ slot: "options" },
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
rules() {
|
||||||
data() {
|
|
||||||
return {
|
return {
|
||||||
search: {
|
wordName: [{required: true, message: '请输入特征词', trigger: 'blur' }],
|
||||||
current: 1,
|
|
||||||
size: 10,
|
|
||||||
groupName: ''
|
|
||||||
},
|
|
||||||
form: {
|
|
||||||
groupName: '',
|
|
||||||
showIndex: ''
|
|
||||||
},
|
|
||||||
id: '',
|
|
||||||
isShowAdd: false,
|
|
||||||
total: 0,
|
|
||||||
colConfigs: [
|
|
||||||
{prop: 'groupName', label: '事件类型', align: 'left'},
|
|
||||||
{prop: 'showIndex', label: '排序', align: 'center'},
|
|
||||||
{slot: 'options', label: '操作'}
|
|
||||||
],
|
|
||||||
tableData: []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
},
|
||||||
computed: {
|
methods: {
|
||||||
...mapState(['user'])
|
getTableData() {
|
||||||
|
this.instance.post(`/app/appsessionarchivefeaturelibrary/list`,null,{
|
||||||
|
params: {
|
||||||
|
...this.search
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if(res?.data) {
|
||||||
|
this.tableData = res.data.records
|
||||||
|
this.total = res.data.total
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
del(row) {
|
||||||
mounted() {
|
this.$confirm('确定删除该数据?').then(() => {
|
||||||
this.getList()
|
this.instance.post(`/app/appsessionarchivefeaturelibrary/delete?ids=${row.id}`).then(res => {
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
getList() {
|
|
||||||
this.instance.post(`/app/appresidentreportgroup/list`, null, {
|
|
||||||
params: {
|
|
||||||
...this.search
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.tableData = res.data.records
|
this.$message.success('删除成功!')
|
||||||
this.total = res.data.total
|
this.getTableData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
})
|
||||||
|
},
|
||||||
edit (e) {
|
changeStatus(row, text) {
|
||||||
this.id = e.id
|
this.$confirm(`确定${text}该特征词?`).then(() => {
|
||||||
this.form.groupName = e.groupName
|
this.instance.post(`/app/appsessionarchivefeaturelibrary/enable?id=${row.id}`).then(res => {
|
||||||
this.form.showIndex = ''
|
if (res.code == 0) {
|
||||||
|
this.$message.success('操作成功!')
|
||||||
this.$nextTick(() => {
|
this.getTableData()
|
||||||
this.isShowAdd = true
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
onClose () {
|
|
||||||
this.id = ''
|
|
||||||
this.form.showIndex = ''
|
|
||||||
this.form.groupName = ''
|
|
||||||
},
|
|
||||||
|
|
||||||
onConfirm () {
|
|
||||||
this.$refs.form.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
this.instance.post(`/app/appresidentreportgroup/addOrUpdate`, {
|
|
||||||
...this.form,
|
|
||||||
id: this.id || null
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$message.success('添加成功')
|
|
||||||
this.isShowAdd = false
|
|
||||||
|
|
||||||
this.getList()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
})
|
||||||
|
},
|
||||||
cancel (isRefresh) {
|
edit(row) {
|
||||||
this.$emit('change', {
|
this.form = {...row}
|
||||||
type: 'list',
|
this.dialog = true
|
||||||
isRefresh: !!isRefresh
|
},
|
||||||
})
|
add() {
|
||||||
},
|
this.dialog = true
|
||||||
|
},
|
||||||
remove(id) {
|
onConfirm() {
|
||||||
this.$confirm('确定删除该数据?').then(() => {
|
if(this.flag) return
|
||||||
this.instance.post(`/app/appresidentreportgroup/delete?ids=${id}`).then(res => {
|
this.$refs.form.validate((valid)=> {
|
||||||
if (res.code == 0) {
|
if(valid) {
|
||||||
this.$message.success('删除成功!')
|
this.flag = true
|
||||||
this.getList()
|
this.instance.post(`/app/appsessionarchivefeaturelibrary/addOrUpdate`,{
|
||||||
|
...this.form,
|
||||||
|
}).then(res => {
|
||||||
|
if(res?.code == 0) {
|
||||||
|
this.$message.success(this.form.id ? '特征词编辑成功' : '特征词添加成功')
|
||||||
|
setTimeout(() =>{
|
||||||
|
this.dialog = false
|
||||||
|
this.getTableData()
|
||||||
|
this.flag = false
|
||||||
|
}, 600)
|
||||||
|
} else {
|
||||||
|
this.flag = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
}
|
})
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
this.$router.push({})
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.Setting {
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.time-select {
|
||||||
|
padding: 0 16px;
|
||||||
|
height: 32px;
|
||||||
|
line-height: 32px;
|
||||||
|
border: 1px solid #d0d4dc;
|
||||||
|
border-radius: 4px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
cursor: pointer;
|
||||||
|
.el-icon-arrow-down {
|
||||||
|
line-height: 32px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep .is-error {
|
||||||
|
.time-select {
|
||||||
|
border: 1px solid #f46!important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,214 +0,0 @@
|
|||||||
<template>
|
|
||||||
<section class="AppWorkingVocabulary">
|
|
||||||
<ai-list>
|
|
||||||
<template slot="title">
|
|
||||||
<ai-title title="工单特征库" isShowBottomBorder></ai-title>
|
|
||||||
</template>
|
|
||||||
<template #content>
|
|
||||||
<ai-search-bar>
|
|
||||||
<template #left>
|
|
||||||
<el-button size="small" type="primary" icon="iconfont iconAdd" @click="add('')">添加</el-button>
|
|
||||||
</template>
|
|
||||||
<template #right>
|
|
||||||
<el-input size="small" placeholder="关键词搜索" v-model="search.name" clearable
|
|
||||||
@clear="current = 1, search.name = '', getTableData()" suffix-icon="iconfont iconSearch"
|
|
||||||
v-throttle="() => {(current = 1), getTableData();}"/>
|
|
||||||
</template>
|
|
||||||
</ai-search-bar>
|
|
||||||
<ai-table :tableData="tableData" :total="total" :current.sync="current" :size.sync="size"
|
|
||||||
@getList="getTableData()" :col-configs="colConfigs" :dict="dict">
|
|
||||||
<el-table-column slot="options" label="操作" align="center">
|
|
||||||
<template slot-scope="{ row }">
|
|
||||||
<el-button type="text" @click="changeStatus(row, '停用', 0)" v-if="row.status == 1">停用</el-button>
|
|
||||||
<el-button type="text" @click="changeStatus(row, '启用', 1)" v-else>启用</el-button>
|
|
||||||
<el-button type="text" @click="edit(row)">编辑</el-button>
|
|
||||||
<el-button type="text" @click="del(row)">删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</ai-table>
|
|
||||||
</template>
|
|
||||||
</ai-list>
|
|
||||||
<ai-dialog
|
|
||||||
:title="form.id ? '编辑特征词' : '添加特征词'"
|
|
||||||
:visible.sync="dialog"
|
|
||||||
:destroyOnClose="true"
|
|
||||||
width="720px"
|
|
||||||
@onConfirm="onConfirm"
|
|
||||||
@closed="form={}">
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-form-item label="特征词" prop="wordName">
|
|
||||||
<el-input v-model.trim="form.wordName" type="textarea" :rows="2" placeholder="多个特征词以;隔开"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</ai-dialog>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapState } from "vuex";
|
|
||||||
export default {
|
|
||||||
name: "AppWorkingVocabulary",
|
|
||||||
label: '工单特征库',
|
|
||||||
props: {
|
|
||||||
instance: Function,
|
|
||||||
dict: Object,
|
|
||||||
permissions: Function,
|
|
||||||
menuName:String
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
search: {
|
|
||||||
wordName: '',
|
|
||||||
current: 1,
|
|
||||||
size: 10,
|
|
||||||
},
|
|
||||||
tableData: [],
|
|
||||||
size: 10,
|
|
||||||
total: 0,
|
|
||||||
current: 1,
|
|
||||||
form: {
|
|
||||||
wordName: '',
|
|
||||||
// areaList: [],
|
|
||||||
deptList: [],
|
|
||||||
},
|
|
||||||
dialog: false,
|
|
||||||
flag: false,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getTableData()
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapState(['user']),
|
|
||||||
colConfigs() {
|
|
||||||
return [
|
|
||||||
{ prop: "wordName", label: '特征词', align: "left"},
|
|
||||||
{ prop: "createTime", label: '创建时间'},
|
|
||||||
{ prop: "createUserName", label: '创建人'},
|
|
||||||
{ prop: "departmentNames", label: '状态'},
|
|
||||||
{ slot: "options" },
|
|
||||||
]
|
|
||||||
},
|
|
||||||
rules() {
|
|
||||||
return {
|
|
||||||
wordName: [{required: true, message: '请输入特征词', trigger: 'blur' }],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getTableData() {
|
|
||||||
this.instance.post(`/app/appsessionarchivekeywordinfo/list`,null,{
|
|
||||||
params: {
|
|
||||||
...this.search,
|
|
||||||
current: this.current,
|
|
||||||
size: this.size,
|
|
||||||
total: this.total,
|
|
||||||
wordName: this.search.name
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
if(res?.data) {
|
|
||||||
this.tableData = res.data.records
|
|
||||||
this.total = res.data.total
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
del(row) {
|
|
||||||
this.$confirm('确定删除该数据?').then(() => {
|
|
||||||
this.instance.post(`/app/appsessionarchivekeywordinfo/delete?ids=${row.id}`).then(res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.$message.success('删除成功!')
|
|
||||||
this.getTableData()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
changeStatus(row, text, status) {
|
|
||||||
this.$confirm(`确定${text}该关键词?`).then(() => {
|
|
||||||
this.instance.post(`/app/appsessionarchivekeywordinfo/updateStatusById?id=${row.id}&status=${status}`).then(res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.$message.success('操作成功!')
|
|
||||||
this.getTableData()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
edit(row) {
|
|
||||||
this.form = {...row}
|
|
||||||
this.form.deptList = []
|
|
||||||
// this.form.areaList = this.form.areaIds.split(',')
|
|
||||||
this.form.deptList = row.departmentIds.split(',')
|
|
||||||
this.dialog = true
|
|
||||||
},
|
|
||||||
add() {
|
|
||||||
this.dialog = true
|
|
||||||
},
|
|
||||||
onUserChange (e) {
|
|
||||||
this.form.deptList = []
|
|
||||||
e.map((item) => {
|
|
||||||
this.form.deptList.push(item.id)
|
|
||||||
})
|
|
||||||
this.$forceUpdate()
|
|
||||||
// this.form.deptList = e
|
|
||||||
// this.$forceUpdate()
|
|
||||||
},
|
|
||||||
onConfirm() {
|
|
||||||
if(this.flag) return
|
|
||||||
|
|
||||||
this.$refs.form.validate((valid)=> {
|
|
||||||
if(valid) {
|
|
||||||
this.flag = true
|
|
||||||
// var departmentIds = []
|
|
||||||
// this.form.deptList.map((item) => {
|
|
||||||
// departmentIds.push(item.id)
|
|
||||||
// })
|
|
||||||
this.instance.post(`/app/appsessionarchivekeywordinfo/addOrUpdate`,{
|
|
||||||
...this.form,
|
|
||||||
// areaIds: this.form.areaList.join(','),
|
|
||||||
departmentIds: this.form.deptList.join(',')
|
|
||||||
}).then(res => {
|
|
||||||
if(res?.code == 0) {
|
|
||||||
this.$message.success(this.form.id ? '关键词编辑成功' : '关键词添加成功')
|
|
||||||
setTimeout(() =>{
|
|
||||||
this.form.deptList = []
|
|
||||||
this.dialog = false
|
|
||||||
this.getTableData()
|
|
||||||
this.flag = false
|
|
||||||
}, 600)
|
|
||||||
} else {
|
|
||||||
this.flag = false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.AppWorkingVocabulary {
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
.time-select {
|
|
||||||
padding: 0 16px;
|
|
||||||
height: 32px;
|
|
||||||
line-height: 32px;
|
|
||||||
border: 1px solid #d0d4dc;
|
|
||||||
border-radius: 4px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
cursor: pointer;
|
|
||||||
.el-icon-arrow-down {
|
|
||||||
line-height: 32px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep .is-error {
|
|
||||||
.time-select {
|
|
||||||
border: 1px solid #f46!important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
Reference in New Issue
Block a user