Merge branch 'build' into release
This commit is contained in:
@@ -125,8 +125,8 @@
|
|||||||
<h2>页面设置</h2>
|
<h2>页面设置</h2>
|
||||||
<div class="layout-config__group">
|
<div class="layout-config__group">
|
||||||
<config-item label="屏幕大小">
|
<config-item label="屏幕大小">
|
||||||
<el-input-number size="mini" :min="0" v-model="bigscreenWidth" disabled controls-position="right"/>
|
<el-input-number size="mini" :min="0" v-model="bigscreenWidth" controls-position="right"/>
|
||||||
<el-input-number size="mini" :min="0" v-model="bigscreenHeight" disabled controls-position="right"/>
|
<el-input-number size="mini" :min="0" v-model="bigscreenHeight" controls-position="right"/>
|
||||||
</config-item>
|
</config-item>
|
||||||
<config-item label="屏幕标题">
|
<config-item label="屏幕标题">
|
||||||
<el-input v-model="dashboard.title" size="mini"/>
|
<el-input v-model="dashboard.title" size="mini"/>
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import List from './components/List'
|
|||||||
import Detail from './components/Detail'
|
import Detail from './components/Detail'
|
||||||
import Setting from './components/Setting'
|
import Setting from './components/Setting'
|
||||||
import settingDetail from "./components/settingDetail";
|
import settingDetail from "./components/settingDetail";
|
||||||
|
import SetKeywordManagement from './components/SetKeywordManagement'
|
||||||
|
import SetReportType from './components/SetReportType'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppWorkOrder',
|
name: 'AppWorkOrder',
|
||||||
@@ -29,24 +31,42 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
currentPage() {
|
currentPage() {
|
||||||
if(this.$route.query.id) { //列表
|
console.log(this.$route)
|
||||||
|
if(this.$route.query.id || this.$route.hash == "#Setting" || this.$route.hash == "#SetKeywordManagement" || this.$route.hash == "#SetReportType") { //列表
|
||||||
this.listIndex = this.$route.query.listIndex
|
this.listIndex = this.$route.query.listIndex
|
||||||
}
|
}
|
||||||
let {hash, query: {id}} = this.$route
|
let {hash, query: {id}} = this.$route
|
||||||
return hash == "#Setting" ? Setting :
|
// return hash == "#Setting" ? Setting :
|
||||||
hash == "#sd" ? settingDetail :
|
// hash == "#sd" ? settingDetail :
|
||||||
!!id ? Detail : List
|
// !!id ? Detail : List
|
||||||
|
|
||||||
|
if(hash == "#sd") {
|
||||||
|
return settingDetail
|
||||||
|
}else if(hash == "#Detail") {
|
||||||
|
return Detail
|
||||||
|
}else if(hash == "#Setting") {
|
||||||
|
return Setting
|
||||||
|
}else if(hash == "#SetKeywordManagement") {
|
||||||
|
return SetKeywordManagement
|
||||||
|
}else if(hash == "#SetReportType") {
|
||||||
|
return SetReportType
|
||||||
|
}else {
|
||||||
|
return List
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
List,
|
List,
|
||||||
Detail,
|
Detail,
|
||||||
Setting
|
Setting,
|
||||||
|
SetKeywordManagement,
|
||||||
|
SetReportType
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
onChange(data) {
|
onChange(data) {
|
||||||
this.$router.push({query: data.params, hash: data.type == "Setting" ? "#Setting" : ""})
|
// this.$router.push({query: data.params, hash: data.type == "Setting" ? "#Setting" : ""})
|
||||||
|
this.$router.push({query: data.params, hash: data.type == data.type ? data.type : ""})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<ai-detail class="reportAtWillDetail" v-loading="isLoading">
|
<ai-detail class="Detail" v-loading="isLoading">
|
||||||
<template #title>
|
<template #title>
|
||||||
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(true)">
|
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||||||
<template #rightBtn>
|
<template #rightBtn>
|
||||||
<div class="title-btns">
|
<div class="title-btns">
|
||||||
<el-button type="primary" icon="iconfont iconPerson_Transfered" @click="isShowForward = true" v-if="detail.eventStatus < 2">指派事件</el-button>
|
<el-button type="primary" icon="iconfont iconPerson_Transfered" @click="isShowForward = true" v-if="detail.powerTransmit">指派事件</el-button>
|
||||||
<el-button type="primary" icon="iconfont iconRegister" @click="isShowAdd = true" v-if="detail.eventStatus < 2">处理事件</el-button>
|
<el-button type="primary" icon="iconfont iconRegister" @click="isShowAdd = true" v-if="detail.powerHandle">处理事件</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</ai-title>
|
</ai-title>
|
||||||
@@ -14,28 +14,21 @@
|
|||||||
<div class="detail-content__wrapper">
|
<div class="detail-content__wrapper">
|
||||||
<div class="detail-content__wrapper--left">
|
<div class="detail-content__wrapper--left">
|
||||||
<ai-card title="基础信息">
|
<ai-card title="基础信息">
|
||||||
<template #right>
|
|
||||||
<el-button type="primary" @click="editClick()" v-if="detail.eventStatus != 2 && detail.eventStatus != 3">编辑</el-button>
|
|
||||||
</template>
|
|
||||||
<template #content>
|
<template #content>
|
||||||
<ai-wrapper>
|
<ai-wrapper>
|
||||||
<ai-info-item label="上报人员" :value="detail.name"></ai-info-item>
|
<ai-info-item label="上报人员" :value="detail.name"></ai-info-item>
|
||||||
<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="消息来源" v-if="listIndex == 2">{{ dict.getLabel('residentEventSource', detail.eventSource) }}</ai-info-item>
|
||||||
<ai-info-item label="事件类型">{{ detail.type }}</ai-info-item>
|
<ai-info-item label="事件来源" v-else>{{ dict.getLabel('residentEventSource', detail.eventSource) }}</ai-info-item>
|
||||||
<ai-info-item label="消息来源">{{ detail.groupName }}</ai-info-item>
|
<ai-info-item label="事件类型">{{ detail.groupName }}</ai-info-item>
|
||||||
<!-- <ai-info-item label="事件来源">{{ dict.getLabel('residentEventSource', detail.eventSource) }}</ai-info-item> -->
|
<ai-info-item label="事件描述" isLine>{{ detail.content }}</ai-info-item>
|
||||||
<ai-info-item label="事件描述" isLine>
|
|
||||||
<span v-html="detail.content"></span>
|
|
||||||
</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>
|
||||||
</ai-info-item>
|
</ai-info-item>
|
||||||
<ai-info-item label="所属网格">{{ detail.girdName }}</ai-info-item>
|
<ai-info-item label="所属网格">{{ detail.girdName }}</ai-info-item>
|
||||||
<ai-info-item label="事件地点" isLine>{{ detail.address }}</ai-info-item>
|
<ai-info-item label="事件位置" isLine>
|
||||||
<ai-info-item label="地图位置" isLine>
|
|
||||||
<div id="map" style="width: 500px; height: 280px;"></div>
|
<div id="map" style="width: 500px; height: 280px;"></div>
|
||||||
</ai-info-item>
|
</ai-info-item>
|
||||||
</ai-wrapper>
|
</ai-wrapper>
|
||||||
@@ -75,17 +68,13 @@
|
|||||||
@closed="onClose"
|
@closed="onClose"
|
||||||
@onConfirm="handleEvent">
|
@onConfirm="handleEvent">
|
||||||
<el-form class="ai-form" label-width="120px" :model="form" ref="form">
|
<el-form class="ai-form" label-width="120px" :model="form" ref="form">
|
||||||
<!-- <el-form-item label="事件分类" prop="groupId" style="width: 100%;" :rules="[{ required: true, message: '请选择事件分类' }]">
|
<el-form-item label="事件分类" prop="groupId" style="width: 100%;" :rules="[{ required: true, message: '请选择事件分类' }]">
|
||||||
<ai-select
|
<ai-select
|
||||||
v-model="form.groupId"
|
v-model="form.groupId"
|
||||||
placeholder="请选择事件分类"
|
placeholder="请选择事件分类"
|
||||||
:selectList="dictList">
|
:selectList="dictList">
|
||||||
</ai-select>
|
</ai-select>
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item label="事件分类" prop="type" :rules="[{ required: true, message: '请选择事件分类' }]" style="width: 100%;">
|
|
||||||
<ai-select v-model="form.type" :selectList="typeList" placeholder="请选择" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="处理结果" prop="eventStatus" style="width: 100%;" :rules="[{ required: true, message: '请选择处理结果' }]">
|
<el-form-item label="处理结果" prop="eventStatus" style="width: 100%;" :rules="[{ required: true, message: '请选择处理结果' }]">
|
||||||
<el-radio-group v-model="form.eventStatus">
|
<el-radio-group v-model="form.eventStatus">
|
||||||
<el-radio label="1">已办结</el-radio>
|
<el-radio label="1">已办结</el-radio>
|
||||||
@@ -112,12 +101,10 @@
|
|||||||
title="事件指派"
|
title="事件指派"
|
||||||
@onConfirm="onForwardConfirm">
|
@onConfirm="onForwardConfirm">
|
||||||
<el-form class="ai-form" label-width="120px" :model="forwardForm" ref="forwardForm">
|
<el-form class="ai-form" label-width="120px" :model="forwardForm" ref="forwardForm">
|
||||||
<el-form-item label="转交" prop="handleUserName" style="width: 100%;" :rules="[{ required: true, message: '请选择人员' }]">
|
<el-form-item label="转交" prop="name" style="width: 100%;" :rules="[{ required: true, message: '请选择网格员或网格' }]">
|
||||||
<el-input disabled size="small" v-model="forwardForm.handleUserName" clearable placeholder="请选择人员">
|
<el-input disabled size="small" v-model="forwardForm.name" clearable placeholder="请选择网格员或网格">
|
||||||
<template slot="append">
|
<template slot="append">
|
||||||
<ai-user-selecter refs="addTags" :isMultiple="false" :instance="instance" v-model="forwardForm.user" @change="onChooseUser">
|
<el-button @click="getGirdList().then(()=>isShowUser=true )">选择</el-button>
|
||||||
<el-button size="small">选择人员</el-button>
|
|
||||||
</ai-user-selecter>
|
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -135,74 +122,36 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
<ai-dialog
|
<ai-dialog
|
||||||
:visible.sync="isShowEdit"
|
:visible.sync="isShowUser"
|
||||||
width="800px"
|
width="800px"
|
||||||
@close="onCloseEdit"
|
title="选择网格员"
|
||||||
title="编辑事件"
|
@onConfirm="onConfirm">
|
||||||
@onConfirm="onConfirmEdit">
|
<div class="grid-wrapper">
|
||||||
<el-form class="ai-form" label-width="120px" :model="editInfo" ref="editInfo">
|
<el-input
|
||||||
<el-form-item label="事件描述" prop="content" style="width: 100%;" :rules="[{ required: true, message: '请输入事件描述' }]">
|
style="margin-bottom: 10px;"
|
||||||
<el-input type="textarea" :rows="8" :maxlength="500" v-model="editInfo.content" clearable placeholder="请输入事件描述" show-word-limit></el-input>
|
size="small"
|
||||||
</el-form-item>
|
placeholder="请输入网格名称/网格员姓名/网格员电话"
|
||||||
<el-form-item label="事件类型" prop="type" :rules="[{ required: true, message: '请选择事件类型' }]" style="width: 100%;">
|
v-model="name" @change="$refs.tree.filter(name)"
|
||||||
<ai-select v-model="editInfo.type" :selectList="typeList" placeholder="请选择" />
|
suffix-icon="iconfont iconSearch">
|
||||||
</el-form-item>
|
</el-input>
|
||||||
<el-form-item label="所属网格" style="width: 100%;">
|
<el-tree
|
||||||
<el-input disabled size="small" v-model="editInfo.girdName" clearable>
|
:filter-node-method="filterNode"
|
||||||
<template slot="append">
|
ref="tree"
|
||||||
<ai-picker :ops="{label: 'girdName'}" :instance="instance" v-model="editInfo.girdIds" @pick="e => onUserChange(e)" dialogTitle="选择所属网格" action="/app/appgirdinfo/girdList">
|
:props="defaultProps"
|
||||||
<div class="time-select">
|
node-key="id"
|
||||||
<span class="dept-name" style="color:#999;">选择所属网格</span>
|
:data="tree"
|
||||||
<i class="el-icon-arrow-down"></i>
|
highlight-current
|
||||||
</div>
|
@current-change="onTreeChange">
|
||||||
</ai-picker>
|
<div class="tree-container" slot-scope="{ data }">
|
||||||
</template>
|
<div class="tree-container__user">
|
||||||
</el-input>
|
<div class="tree-user__item">
|
||||||
</el-form-item>
|
<span v-if="!data.isUser">{{ data.girdName }}</span>
|
||||||
<el-form-item label="联系方式" prop="phone" style="width: 100%;">
|
<span v-else>{{data.name}}<span v-if="data.phone">-{{data.phone}}</span></span>
|
||||||
<el-input
|
</div>
|
||||||
size="small"
|
</div>
|
||||||
v-model="editInfo.phone"
|
</div>
|
||||||
placeholder="请输入..."
|
</el-tree>
|
||||||
clearabel
|
</div>
|
||||||
:maxLength="11"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="图片" prop="files" style="width: 100%;">
|
|
||||||
<ai-uploader
|
|
||||||
:instance="instance"
|
|
||||||
v-model="editInfo.files"
|
|
||||||
isShowTip
|
|
||||||
:limit="9">
|
|
||||||
</ai-uploader>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="事件地点" style="width: 100%;">
|
|
||||||
<el-input disabled size="small" v-model="editInfo.address"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="上报位置" prop="lat">
|
|
||||||
<el-button @click="showMap = true">地图标绘</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</ai-dialog>
|
|
||||||
<ai-dialog title="地图" :visible.sync="showMap" @opened="initMapSelect" width="800px" class="mapDialog" @onConfirm="selectMap">
|
|
||||||
<div id="mapDialog" style="height:400px;"></div>
|
|
||||||
<el-form label-width="80px" style="padding: 10px 20px 0 0;">
|
|
||||||
<el-row type="flex" justify="space-between">
|
|
||||||
<el-form-item label="经度">
|
|
||||||
<el-input disabled size="small" v-model="placeDetail.lng" style="width:100px;"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="纬度">
|
|
||||||
<el-input disabled size="small" v-model="placeDetail.lat" style="width:100px;"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="地址">
|
|
||||||
<el-input disabled size="small" v-model="placeDetail.address" style="width:300px;"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<el-input id="searchPlaceInput" size="medium" class="searchPlaceInput" clearable v-model="searchPlace" autocomplete="on" @change="placeSearch.search(searchPlace)" placeholder="请输入关键字">
|
|
||||||
<el-button type="primary" slot="append" @click="placeSearch.search(searchPlace)">搜索</el-button>
|
|
||||||
</el-input>
|
|
||||||
<div id="searchPlaceOutput" />
|
|
||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
</template>
|
</template>
|
||||||
</ai-detail>
|
</ai-detail>
|
||||||
@@ -220,14 +169,16 @@ export default {
|
|||||||
return {
|
return {
|
||||||
forwardForm: {
|
forwardForm: {
|
||||||
content: '',
|
content: '',
|
||||||
handleUserId: '',
|
girdId: '',
|
||||||
handleUserName: '',
|
girdName: '',
|
||||||
files: [],
|
girdMemberId: '',
|
||||||
user: []
|
girdMemberName: '',
|
||||||
|
name: ''
|
||||||
},
|
},
|
||||||
isLoading: true,
|
isLoading: true,
|
||||||
name: '',
|
name: '',
|
||||||
detail: {},
|
detail: {},
|
||||||
|
isShowUser: false,
|
||||||
eventList: [],
|
eventList: [],
|
||||||
isShowAdd: false,
|
isShowAdd: false,
|
||||||
userList: [],
|
userList: [],
|
||||||
@@ -244,21 +195,9 @@ export default {
|
|||||||
groupId: '',
|
groupId: '',
|
||||||
groupName: '',
|
groupName: '',
|
||||||
content: [],
|
content: [],
|
||||||
eventStatus: '1',
|
eventStatus: '1'
|
||||||
type: ''
|
|
||||||
},
|
},
|
||||||
evaluation: {},
|
evaluation: {}
|
||||||
isShowEdit: false, //编辑工单信息
|
|
||||||
editInfo: {},
|
|
||||||
placeDetail: {
|
|
||||||
lng: '',
|
|
||||||
lat: '',
|
|
||||||
address: ''
|
|
||||||
},
|
|
||||||
showMap: false,
|
|
||||||
searchPlace: '',
|
|
||||||
map: null,
|
|
||||||
typeList: []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -273,21 +212,21 @@ export default {
|
|||||||
|
|
||||||
created() {
|
created() {
|
||||||
this.getDict()
|
this.getDict()
|
||||||
this.getTypeList()
|
this.dict.load('clapEventStatus', 'residentEventSource').then(() => {
|
||||||
this.dict.load('clapEventStatus', 'residentEventSource', 'xbotReportEventType').then(() => {
|
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getDetail() {
|
getDetail() {
|
||||||
this.instance.post('/app/appsessionarchivereportinfo/queryDetailById', null, {
|
this.instance.post('/app/apppatrolreportinfov2/queryDetailById', null, {
|
||||||
params: {id: this.$route.query.id}
|
params: {id: this.$route.query.id}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
this.detail = res.data
|
this.detail = res.data
|
||||||
this.processList = res.data.processList
|
this.processList = res.data.processList
|
||||||
this.$forceUpdate()
|
this.form.groupId = res.data.groupId
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.initMap()
|
this.initMap()
|
||||||
})
|
})
|
||||||
@@ -297,18 +236,9 @@ export default {
|
|||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getTypeList() {
|
|
||||||
this.instance.post(`/app/appsessionarchivefeaturelibrary/eventTypeList`).then(res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
res.data.map((item) => {
|
|
||||||
var i = {dictName: item, dictValue: item}
|
|
||||||
this.typeList.push(i)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getGirdList() {
|
getGirdList() {
|
||||||
return this.instance.post(`/app/appresidentreportinfo/listGirdInfoByTransfer?id=${this.$route.query.id}`).then(res => {
|
return this.instance.post(`/app/apppatrolreportinfov2/listGirdInfoByTransfer?id=${this.$route.query.id}`).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
// return this.tree = this.formatList([res.data])
|
// return this.tree = this.formatList([res.data])
|
||||||
this.tree = res.data
|
this.tree = res.data
|
||||||
@@ -328,8 +258,11 @@ export default {
|
|||||||
this.form.content = ''
|
this.form.content = ''
|
||||||
this.form.eventStatus = ''
|
this.form.eventStatus = ''
|
||||||
this.forwardForm.content = ''
|
this.forwardForm.content = ''
|
||||||
this.forwardForm.handleUserName = ''
|
this.forwardForm.girdId = ''
|
||||||
this.forwardForm.user = []
|
this.forwardForm.girdName = ''
|
||||||
|
this.forwardForm.girdMemberId = ''
|
||||||
|
this.forwardForm.girdMemberName = ''
|
||||||
|
this.forwardForm.name = ''
|
||||||
this.forwardForm.files = []
|
this.forwardForm.files = []
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -359,24 +292,45 @@ export default {
|
|||||||
onForwardConfirm() {
|
onForwardConfirm() {
|
||||||
this.$refs.forwardForm.validate(v => {
|
this.$refs.forwardForm.validate(v => {
|
||||||
if (v) {
|
if (v) {
|
||||||
this.instance.post('/app/appsessionarchivereportinfo/transfer', {
|
this.instance.post('/app/apppatrolreportinfov2/transfer', {
|
||||||
...this.forwardForm,
|
...this.forwardForm,
|
||||||
id: this.$route.query.id
|
id: this.$route.query.id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.code == 0) {
|
if (res?.code == 0) {
|
||||||
this.$message.success('转交成功!')
|
|
||||||
this.isShowForward = false
|
this.isShowForward = false
|
||||||
this.processList = []
|
|
||||||
this.onClose()
|
this.onClose()
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
|
this.$message.success('转交成功!')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onConfirm() {
|
||||||
|
// if (this.gridInfo.userId) {
|
||||||
|
// this.forwardForm.girdId = this.gridInfo.girdId
|
||||||
|
// this.forwardForm.girdName = this.gridInfo.girdName
|
||||||
|
// this.forwardForm.girdMemberId = this.gridInfo.id
|
||||||
|
// this.forwardForm.girdMemberName = this.gridInfo.name
|
||||||
|
// } else {
|
||||||
|
// this.forwardForm.girdId = this.gridInfo.id
|
||||||
|
// }
|
||||||
|
// this.forwardForm.girdName = this.gridInfo.girdName
|
||||||
|
// this.forwardForm.name = `${this.gridInfo.girdName}${this.gridInfo.name ? '-' + this.gridInfo.name : ''}`
|
||||||
|
// this.isShowUser = false
|
||||||
|
if(!this.gridInfo.userId) {
|
||||||
|
return this.$message.error('请选择网格员!')
|
||||||
|
}
|
||||||
|
this.forwardForm.girdId = this.gridInfo.girdId
|
||||||
|
this.forwardForm.girdName = this.gridInfo.girdName
|
||||||
|
this.forwardForm.girdMemberId = this.gridInfo.id
|
||||||
|
this.forwardForm.girdMemberName = this.gridInfo.name
|
||||||
|
this.forwardForm.name = `${this.gridInfo.girdName}${this.gridInfo.name ? '-' + this.gridInfo.name : ''}`
|
||||||
|
this.isShowUser = false
|
||||||
|
},
|
||||||
getDict() {
|
getDict() {
|
||||||
this.instance.post(`/app/appresidentreportgroup/list?current=1&size=100000`).then(res => {
|
this.instance.post(`/app/apppatrolreportgroupv2/list?current=1&size=100000`).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.dictList = res.data.records.map(v => {
|
this.dictList = res.data.records.map(v => {
|
||||||
return {
|
return {
|
||||||
@@ -390,7 +344,7 @@ export default {
|
|||||||
|
|
||||||
close() {
|
close() {
|
||||||
this.$confirm('确定关闭该事件?').then(() => {
|
this.$confirm('确定关闭该事件?').then(() => {
|
||||||
this.instance.post(`/app/appresidentreportinfo/delete?ids=${this.$route.query.id}`).then(res => {
|
this.instance.post(`/app/apppatrolreportinfov2/delete?ids=${this.$route.query.id}`).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.$message.success('删除成功!')
|
this.$message.success('删除成功!')
|
||||||
this.getList()
|
this.getList()
|
||||||
@@ -402,17 +356,7 @@ export default {
|
|||||||
cancel(isRefresh) {
|
cancel(isRefresh) {
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
type: 'list',
|
type: 'list',
|
||||||
isRefresh: !!isRefresh,
|
isRefresh: !!isRefresh
|
||||||
listIndex: this.listIndex
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
onChange(e) {
|
|
||||||
this.instance.post(`/app/appvillagerintegralrule/list?size=1000&classification=${e}&ruleStatus=1`).then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.form.ruleId = ''
|
|
||||||
this.eventList = res.data.records
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -438,8 +382,9 @@ export default {
|
|||||||
handleEvent() {
|
handleEvent() {
|
||||||
this.$refs.form.validate(v => {
|
this.$refs.form.validate(v => {
|
||||||
if (v) {
|
if (v) {
|
||||||
this.instance.post('/app/appsessionarchivereportinfo/finish', {
|
this.instance.post('/app/apppatrolreportinfov2/finish', {
|
||||||
...this.form,
|
...this.form,
|
||||||
|
groupName: this.dictList.filter(v => v.dictValue === this.form.groupId)[0].dictName,
|
||||||
id: this.$route.query.id
|
id: this.$route.query.id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.code == 0) {
|
if (res?.code == 0) {
|
||||||
@@ -450,117 +395,13 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
|
||||||
|
|
||||||
onChooseUser(v) {
|
|
||||||
this.forwardForm.handleUserId = v[0].id
|
|
||||||
this.forwardForm.handleUserName = v[0].name
|
|
||||||
this.forwardForm.user = v
|
|
||||||
},
|
|
||||||
|
|
||||||
editClick() {
|
|
||||||
this.isShowEdit = true
|
|
||||||
this.editInfo = {...this.detail}
|
|
||||||
this.editInfo.girdIds = []
|
|
||||||
if(this.editInfo.girdId) {
|
|
||||||
this.editInfo.girdIds.push(this.editInfo.girdId)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
selectMap() {
|
|
||||||
this.editInfo.lng = this.placeDetail.lng
|
|
||||||
this.editInfo.lat = this.placeDetail.lat
|
|
||||||
this.editInfo.address = this.placeDetail.address
|
|
||||||
this.showMap = false
|
|
||||||
},
|
|
||||||
initMapSelect() {
|
|
||||||
AMapLoader.load({
|
|
||||||
key: 'b553334ba34f7ac3cd09df9bc8b539dc',
|
|
||||||
version: '2.0',
|
|
||||||
plugins: ['AMap.PlaceSearch', 'AMap.AutoComplete', 'AMap.Geocoder'],
|
|
||||||
}).then((AMap2) => {
|
|
||||||
this.map = new AMap2.Map('mapDialog', {
|
|
||||||
resizeEnable: true,
|
|
||||||
zooms: [6, 20],
|
|
||||||
zoom: 11,
|
|
||||||
center:[107.11059, 31.56618],
|
|
||||||
})
|
|
||||||
this.placeSearch = new AMap2.PlaceSearch({ map: this.map })
|
|
||||||
new AMap2.AutoComplete({
|
|
||||||
input: 'searchPlaceInput',
|
|
||||||
output: 'searchPlaceOutput',
|
|
||||||
}).on('select', (e) => {
|
|
||||||
if (e?.poi) {
|
|
||||||
this.placeSearch.setCity(e.poi.adcode)
|
|
||||||
this.movePosition(e.poi.location)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.map.on('click', (e) => {
|
|
||||||
new AMap2.Geocoder().getAddress(e.lnglat, (sta, res) => {
|
|
||||||
if (res?.regeocode) {
|
|
||||||
this.placeDetail = {
|
|
||||||
lng: e.lnglat?.lng,
|
|
||||||
lat: e.lnglat?.lat,
|
|
||||||
address: res.regeocode.formattedAddress,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.movePosition(e.lnglat)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
movePosition(center) {
|
|
||||||
if (this.map) {
|
|
||||||
this.map.clearMap()
|
|
||||||
this.map.panTo(center)
|
|
||||||
this.map.add([
|
|
||||||
new AMap.Marker({
|
|
||||||
position: center,
|
|
||||||
clickable: true,
|
|
||||||
}),
|
|
||||||
])
|
|
||||||
this.map.setFitView()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
onUserChange (e) {
|
|
||||||
if (e.length) {
|
|
||||||
this.editInfo.girdName = e[0].girdName
|
|
||||||
} else {
|
|
||||||
this.editInfo.girdIds = []
|
|
||||||
this.editInfo.girdName = ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
onCloseEdit() {
|
|
||||||
this.isShowEdit = false
|
|
||||||
this.editInfo = {}
|
|
||||||
},
|
|
||||||
|
|
||||||
onConfirmEdit() {
|
|
||||||
this.$refs.editInfo.validate(v => {
|
|
||||||
if (v) {
|
|
||||||
this.instance.post('/app/appsessionarchivereportinfo/update', {
|
|
||||||
...this.editInfo,
|
|
||||||
id: this.$route.query.id,
|
|
||||||
girdIds: this.editInfo.girdIds.length ? this.editInfo.girdIds[0] : ''
|
|
||||||
}).then(res => {
|
|
||||||
if (res?.code == 0) {
|
|
||||||
this.isShowEdit = false
|
|
||||||
this.getDetail()
|
|
||||||
this.$message.success('编辑成功!')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.reportAtWillDetail {
|
.Detail {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.grid-wrapper {
|
.grid-wrapper {
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<ai-list>
|
<ai-list>
|
||||||
<template #title>
|
<template #title>
|
||||||
<ai-title :title="menuName" isShowBottomBorder>
|
<ai-title :title="menuName" isShowBottomBorder>
|
||||||
<el-button type="primary" slot="rightBtn" @click="toSetting" v-if="currIndex==0">工单特征库设置</el-button>
|
<el-button type="primary" slot="rightBtn" @click="toSetting">{{rightBtnTextList[currIndex]}}设置</el-button>
|
||||||
</ai-title>
|
</ai-title>
|
||||||
</template>
|
</template>
|
||||||
<!-- <template slot="tabs">
|
<!-- <template slot="tabs">
|
||||||
@@ -23,18 +23,18 @@
|
|||||||
:selectList="dict.getDict('clapEventStatus')"
|
:selectList="dict.getDict('clapEventStatus')"
|
||||||
@change="search.current = 1, getList()">
|
@change="search.current = 1, getList()">
|
||||||
</ai-select>
|
</ai-select>
|
||||||
<ai-select v-if="currIndex == 0"
|
<ai-select
|
||||||
v-model="search.type"
|
v-model="search.type"
|
||||||
clearable
|
clearable
|
||||||
placeholder="事件类型"
|
:placeholder="currIndex == 1 ? '触发敏感词' : '事件类型'"
|
||||||
:selectList="typeList"
|
:selectList="typeList"
|
||||||
@change="search.current = 1, getList()">
|
@change="search.current = 1, getList()">
|
||||||
</ai-select>
|
</ai-select>
|
||||||
<ai-select v-if="currIndex == 1"
|
<!-- <ai-select v-if="currIndex == 1"
|
||||||
v-model="search.eventSource"
|
v-model="search.type"
|
||||||
clearable
|
clearable
|
||||||
placeholder="触发敏感词"
|
placeholder="触发敏感词"
|
||||||
:selectList="dict.getDict('residentEventSource')"
|
:selectList="typeList"
|
||||||
@change="search.current = 1, getList()">
|
@change="search.current = 1, getList()">
|
||||||
</ai-select>
|
</ai-select>
|
||||||
<ai-select v-if="currIndex == 2"
|
<ai-select v-if="currIndex == 2"
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
placeholder="事件来源"
|
placeholder="事件来源"
|
||||||
:selectList="dict.getDict('residentEventSource')"
|
:selectList="dict.getDict('residentEventSource')"
|
||||||
@change="search.current = 1, getList()">
|
@change="search.current = 1, getList()">
|
||||||
</ai-select>
|
</ai-select> -->
|
||||||
|
|
||||||
<el-date-picker size="small" v-model="searchDotime" type="daterange" range-separator="至" @change="timeChange"
|
<el-date-picker size="small" v-model="searchDotime" type="daterange" range-separator="至" @change="timeChange"
|
||||||
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
|
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
class="search-input"
|
class="search-input"
|
||||||
size="small"
|
size="small"
|
||||||
v-throttle="() => {search.current = 1, getList()}"
|
v-throttle="() => {search.current = 1, getList()}"
|
||||||
:placeholder="placeholderTextList[currIndex]"
|
:placeholder="currIndex == 1 ? '敏感词、涉及对象、姓名、手机号' : '请输入内容描述/上报人员/联系方式'"
|
||||||
clearable
|
clearable
|
||||||
@change="getList"
|
@change="getList"
|
||||||
@clear="search.current = 1, search.content = '', getList()"
|
@clear="search.current = 1, search.content = '', getList()"
|
||||||
@@ -132,12 +132,13 @@ export default {
|
|||||||
searchDotime: [],
|
searchDotime: [],
|
||||||
typeList: [],
|
typeList: [],
|
||||||
tabs: [
|
tabs: [
|
||||||
{label: '舆情工单'},
|
{label: '舆情工单', value: 2},
|
||||||
{label: '敏感词工单'},
|
{label: '敏感词工单', value: 3},
|
||||||
{label: '事件上报'}
|
{label: '巡查上报', value: 1},
|
||||||
|
{label: '居民上报', value: 0}
|
||||||
],
|
],
|
||||||
currIndex: 0,
|
currIndex: 0,
|
||||||
placeholderTextList: ['请输入内容描述/上报人员/联系方式', '敏感词、涉及对象、姓名、手机号', '请输入内容描述/上报人员/联系方式'],
|
rightBtnTextList: ['工单特征库', '敏感关键词', '事件类型', '事件类型'],
|
||||||
colConfigs: []
|
colConfigs: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -148,8 +149,8 @@ export default {
|
|||||||
colConfigs1() {
|
colConfigs1() {
|
||||||
return [
|
return [
|
||||||
{prop: 'content', label: '内容描述', width: '300px'},
|
{prop: 'content', label: '内容描述', width: '300px'},
|
||||||
{prop: 'type', label: '事件类型', align: 'center', dict: 'xbotReportEventType'},
|
{prop: 'groupName', label: '事件类型', align: 'center'},
|
||||||
{prop: 'groupName', label: '所属群聊', align: 'center'},
|
{prop: 'wxGroupName', label: '所属群聊', align: 'center'},
|
||||||
{prop: 'createTime', label: '上报时间', align: 'center'},
|
{prop: 'createTime', label: '上报时间', align: 'center'},
|
||||||
{prop: 'name', label: '昵称', align: 'center'},
|
{prop: 'name', label: '昵称', align: 'center'},
|
||||||
// {prop: 'phone', label: '联系方式', align: 'center'},
|
// {prop: 'phone', label: '联系方式', align: 'center'},
|
||||||
@@ -161,8 +162,8 @@ export default {
|
|||||||
colConfigs2() {
|
colConfigs2() {
|
||||||
return [
|
return [
|
||||||
{prop: 'content', label: '内容描述', width: '300px'},
|
{prop: 'content', label: '内容描述', width: '300px'},
|
||||||
{prop: 'type', label: '事件类型', align: 'center', dict: 'xbotReportEventType'},
|
{prop: 'groupName', label: '事件类型', align: 'center'},
|
||||||
{prop: 'groupName', label: '所属群聊', align: 'center'},
|
{prop: 'wxGroupName', label: '所属群聊', align: 'center'},
|
||||||
{prop: 'name', label: '姓名', align: 'center'},
|
{prop: 'name', label: '姓名', align: 'center'},
|
||||||
{prop: 'createTime', label: '上报时间', align: 'center'},
|
{prop: 'createTime', label: '上报时间', align: 'center'},
|
||||||
// {prop: 'phone', label: '联系方式', align: 'center'},
|
// {prop: 'phone', label: '联系方式', align: 'center'},
|
||||||
@@ -174,9 +175,9 @@ export default {
|
|||||||
colConfigs3() {
|
colConfigs3() {
|
||||||
return [
|
return [
|
||||||
{prop: 'content', label: '内容描述', width: '300px'},
|
{prop: 'content', label: '内容描述', width: '300px'},
|
||||||
{prop: 'type', label: '事件来源', align: 'center', dict: 'xbotReportEventType'},
|
{prop: 'eventSource', label: '事件来源', align: 'center', dict: 'residentEventSource'},
|
||||||
{prop: 'type', label: '事件类型', align: 'center', dict: 'xbotReportEventType'},
|
{prop: 'groupName', label: '事件类型', align: 'center'},
|
||||||
{prop: 'groupName', 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'},
|
||||||
{prop: 'phone', label: '联系方式', align: 'center'},
|
{prop: 'phone', label: '联系方式', align: 'center'},
|
||||||
@@ -213,9 +214,11 @@ export default {
|
|||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.instance.post(`/app/appsessionarchivereportinfo/list`, null, {
|
this.instance.post(`/app/apppatrolreportinfov2/list`, null, {
|
||||||
params: {
|
params: {
|
||||||
...this.search
|
...this.search,
|
||||||
|
eventSource: this.tabs[this.currIndex].value,
|
||||||
|
groupName: this.search.type
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
@@ -225,10 +228,11 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getTypeList() {
|
getTypeList() {
|
||||||
this.instance.post(`/app/appsessionarchivefeaturelibrary/eventTypeList`).then(res => {
|
this.typeList = []
|
||||||
|
this.instance.post(`/app/apppatrolreportinfov2/eventTypeList?eventSource=${this.tabs[this.currIndex].value}`).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
res.data.map((item) => {
|
res.data.map((item) => {
|
||||||
var i = {distName: item, dictValue: item}
|
var i = {dictName: item, dictValue: item}
|
||||||
this.typeList.push(i)
|
this.typeList.push(i)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -244,10 +248,12 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
toSetting() {
|
toSetting() {
|
||||||
|
var setNameList = ['Setting', 'SetKeywordManagement', 'SetReportType', 'SetReportType']
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
type: 'Setting',
|
type: setNameList[this.currIndex],
|
||||||
params: {
|
params: {
|
||||||
id: ''
|
id: '',
|
||||||
|
listIndex: this.currIndex
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -271,6 +277,14 @@ export default {
|
|||||||
}else {
|
}else {
|
||||||
this.colConfigs = this.colConfigs3
|
this.colConfigs = this.colConfigs3
|
||||||
}
|
}
|
||||||
|
this.search.current = 1
|
||||||
|
this.search.type = ''
|
||||||
|
this.search.eventStatus = ''
|
||||||
|
this.search.startTime = ''
|
||||||
|
this.search.endTime = ''
|
||||||
|
this.search.content = ''
|
||||||
|
this.getTypeList()
|
||||||
|
this.getList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
235
project/biaopin/AppWorkOrder/components/SetKeywordManagement.vue
Normal file
235
project/biaopin/AppWorkOrder/components/SetKeywordManagement.vue
Normal file
@@ -0,0 +1,235 @@
|
|||||||
|
<template>
|
||||||
|
<section class="SetKeywordManagement">
|
||||||
|
<ai-list>
|
||||||
|
<template slot="title">
|
||||||
|
<ai-title title="关键词管理" isShowBack isShowBottomBorder @onBackClick="cancel"></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" placeholder="请输入敏感词" size="small"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="生效地区" prop="areaList">
|
||||||
|
<ai-area-get :instance="instance" :fullname.sync="form.areaName" v-model="form.areaList" :root="user.info.areaId" multiple></ai-area-get>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="生效部门" prop="deptList">
|
||||||
|
<ai-picker :instance="instance" v-model="form.deptList" @pick="e => onUserChange(e)" :multiple="true" dialogTitle="选择部门" action="/app/wxcp/wxdepartment/departList">
|
||||||
|
<div class="time-select">
|
||||||
|
<span class="dept-name" v-if="form.deptList && form.deptList.length">已选择{{form.deptList.length}}个部门</span>
|
||||||
|
<span class="dept-name" style="color:#999;" v-else>请选择</span>
|
||||||
|
<i class="el-icon-arrow-down"></i>
|
||||||
|
</div>
|
||||||
|
</ai-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</ai-dialog>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapState } from "vuex";
|
||||||
|
export default {
|
||||||
|
name: "SetKeywordManagement",
|
||||||
|
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: [],
|
||||||
|
departmentFullIds: []
|
||||||
|
},
|
||||||
|
dialog: false,
|
||||||
|
flag: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['user']),
|
||||||
|
colConfigs() {
|
||||||
|
return [
|
||||||
|
{ prop: "wordName", label: '关键词', align: "left"},
|
||||||
|
{ prop: "createTime", label: '创建时间'},
|
||||||
|
{ prop: "createUserName", label: '创建人'},
|
||||||
|
// { prop: "areaNames", label: '生效地区'},
|
||||||
|
{ prop: "departmentNames", label: '生效部门'},
|
||||||
|
{ slot: "options" },
|
||||||
|
]
|
||||||
|
},
|
||||||
|
rules() {
|
||||||
|
return {
|
||||||
|
wordName: [{required: true, message: '请输入敏感词', trigger: 'blur' }],
|
||||||
|
// areaList: [{required: true, message: '请选择生效地区', trigger: 'blur' }],
|
||||||
|
deptList: [{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.departmentFullIds = []
|
||||||
|
this.form.deptList = row.departmentIds.split(',')
|
||||||
|
if(row.departmentFullIds) {
|
||||||
|
this.form.departmentFullIds = row.departmentFullIds.split(',')
|
||||||
|
}
|
||||||
|
this.dialog = true
|
||||||
|
},
|
||||||
|
add() {
|
||||||
|
this.dialog = true
|
||||||
|
},
|
||||||
|
onUserChange (e) {
|
||||||
|
this.form.deptList = []
|
||||||
|
this.form.departmentFullIds = []
|
||||||
|
e.map((item) => {
|
||||||
|
console.log(item)
|
||||||
|
this.form.deptList.push(item.id)
|
||||||
|
this.form.departmentFullIds.push(item.fullId)
|
||||||
|
})
|
||||||
|
this.$forceUpdate()
|
||||||
|
// this.form.deptList = e
|
||||||
|
// this.$forceUpdate()
|
||||||
|
},
|
||||||
|
onConfirm() {
|
||||||
|
if(this.flag) return
|
||||||
|
|
||||||
|
this.$refs.form.validate((valid)=> {
|
||||||
|
if(valid) {
|
||||||
|
this.flag = true
|
||||||
|
this.instance.post(`/app/appsessionarchivekeywordinfo/addOrUpdate`,{
|
||||||
|
...this.form,
|
||||||
|
// areaIds: this.form.areaList.join(','),
|
||||||
|
departmentIds: this.form.deptList.join(','),
|
||||||
|
departmentFullIds: this.form.departmentFullIds.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
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
this.$router.push({})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.SetKeywordManagement {
|
||||||
|
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>
|
||||||
188
project/biaopin/AppWorkOrder/components/SetReportType.vue
Normal file
188
project/biaopin/AppWorkOrder/components/SetReportType.vue
Normal file
@@ -0,0 +1,188 @@
|
|||||||
|
<template>
|
||||||
|
<ai-list class="SetReportType">
|
||||||
|
<template slot="title">
|
||||||
|
<ai-title isShowBack isShowBottomBorder title="事件类型" @onBackClick="cancel()"></ai-title>
|
||||||
|
</template>
|
||||||
|
<template slot="content">
|
||||||
|
<ai-search-bar class="search-bar">
|
||||||
|
<template #left>
|
||||||
|
<el-button size="small" type="primary" icon="iconfont iconAdd" @click="isShowAdd = true">添加事件类型</el-button>
|
||||||
|
</template>
|
||||||
|
<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>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
|
||||||
|
<div class="table-options" 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="remove(row.id)">删除</el-button>
|
||||||
|
</div>
|
||||||
|
</el-table-column>
|
||||||
|
</ai-table>
|
||||||
|
<ai-dialog
|
||||||
|
:visible.sync="isShowAdd"
|
||||||
|
width="780px"
|
||||||
|
height="580px"
|
||||||
|
:title="id ? '编辑事件类型' : '添加事件类型'"
|
||||||
|
@close="onClose"
|
||||||
|
@onConfirm="onConfirm">
|
||||||
|
<el-form ref="form" class="ai-form" :model="form" label-width="110px" label-position="right">
|
||||||
|
<el-form-item label="事件类型" prop="groupName" style="width: 100%;" :rules="[{ required: true, message: '请输入事件类型名称', trigger: 'blur' }]">
|
||||||
|
<el-input size="small" :maxlength="10" show-word-limit placeholder="请输入事件类型名称" v-model="form.groupName"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="排序" prop="showIndex" style="width: 100%;" :rules="[{ required: true, message: '请输入排序', trigger: 'blur' }]">
|
||||||
|
<el-input-number size="small" v-model="form.showIndex" :min="1" :max="100" label="请输入排序"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</ai-dialog>
|
||||||
|
</template>
|
||||||
|
</ai-list>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
export default {
|
||||||
|
name: 'List',
|
||||||
|
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
search: {
|
||||||
|
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: {
|
||||||
|
...mapState(['user'])
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
getList() {
|
||||||
|
this.instance.post(`/app/apppatrolreportgroupv2/list`, null, {
|
||||||
|
params: {
|
||||||
|
...this.search
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.tableData = res.data.records
|
||||||
|
this.total = res.data.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
edit (e) {
|
||||||
|
this.id = e.id
|
||||||
|
this.form.groupName = e.groupName
|
||||||
|
this.form.showIndex = ''
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.isShowAdd = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
onClose () {
|
||||||
|
this.id = ''
|
||||||
|
this.form.showIndex = ''
|
||||||
|
this.form.groupName = ''
|
||||||
|
},
|
||||||
|
|
||||||
|
onConfirm () {
|
||||||
|
this.$refs.form.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.instance.post(`/app/apppatrolreportgroupv2/addOrUpdate`, {
|
||||||
|
...this.form,
|
||||||
|
id: this.id || null
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success('添加成功')
|
||||||
|
this.isShowAdd = false
|
||||||
|
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
cancel() {
|
||||||
|
this.$router.push({})
|
||||||
|
},
|
||||||
|
|
||||||
|
remove(id) {
|
||||||
|
this.$confirm('确定删除该数据?').then(() => {
|
||||||
|
this.instance.post(`/app/apppatrolreportgroupv2/delete?ids=${id}`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('删除成功!')
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
changeStatus(row, text, status) {
|
||||||
|
this.$confirm(`确定${text}该关键词?`).then(() => {
|
||||||
|
this.instance.post(`/app/apppatrolreportgroupv2/addOrUpdate?id=${row.id}&status=${status}`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('操作成功!')
|
||||||
|
this.getTableData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
</style>
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
<el-input placeholder="请输入三类" size="small" v-model="form.classThree"></el-input>
|
<el-input placeholder="请输入三类" size="small" v-model="form.classThree"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="分值" prop="integral" style="width: 100%;" :rules="[{required: true, message: '请输入分值', trigger: 'change'}]">
|
<el-form-item label="分值" prop="integral" style="width: 100%;" :rules="[{required: true, message: '请输入分值', trigger: 'change'}]">
|
||||||
<el-input-number v-model="form.integral" :min="0"></el-input-number>
|
<el-input-number v-model="form.integral"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
@@ -41,98 +41,98 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex'
|
export default {
|
||||||
export default {
|
name: 'Add',
|
||||||
name: 'Add',
|
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
params: Object
|
params: Object
|
||||||
},
|
},
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
classOne: '',
|
classOne: '',
|
||||||
classThree: '',
|
classThree: '',
|
||||||
classTwo: '',
|
classTwo: '',
|
||||||
girdId: '',
|
girdId: '',
|
||||||
girdName: '',
|
girdName: '',
|
||||||
integral: ''
|
integral: ''
|
||||||
},
|
},
|
||||||
id: ''
|
id: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
created () {
|
created() {
|
||||||
if (this.params && this.params.id) {
|
if (this.params && this.params.id) {
|
||||||
this.id = this.params.id
|
this.id = this.params.id
|
||||||
this.getInfo(this.params.id)
|
this.getInfo(this.params.id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getInfo (id) {
|
getInfo(id) {
|
||||||
this.instance.post(`/app/appintegralpublicityinfo/queryDetailById?id=${id}`).then(res => {
|
this.instance.post(`/app/appintegralpublicityinfo/queryDetailById?id=${id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form = {
|
this.form = {
|
||||||
...res.data,
|
...res.data,
|
||||||
girdId: [res.data.girdId]
|
girdId: [res.data.girdId]
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
confirm () {
|
|
||||||
this.$refs.form.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
this.isFlag = true
|
|
||||||
this.instance.post(`/app/appintegralpublicityinfo/addOrUpdate`, {
|
|
||||||
...this.form,
|
|
||||||
girdId: this.form.girdId[0]
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.$message.success('提交成功')
|
|
||||||
setTimeout(() => {
|
|
||||||
this.cancel(true)
|
|
||||||
}, 600)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
cancel (isRefresh) {
|
|
||||||
this.$emit('change', {
|
|
||||||
type: 'List',
|
|
||||||
isRefresh: !!isRefresh
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
onUserChange (e) {
|
|
||||||
if (e.length) {
|
|
||||||
this.form.girdName = e[0].girdName
|
|
||||||
} else {
|
|
||||||
this.form.girdId = []
|
|
||||||
this.form.girdName = ''
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
confirm() {
|
||||||
|
this.$refs.form.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.isFlag = true
|
||||||
|
this.instance.post(`/app/appintegralpublicityinfo/addOrUpdate`, {
|
||||||
|
...this.form,
|
||||||
|
girdId: this.form.girdId[0]
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('提交成功')
|
||||||
|
setTimeout(() => {
|
||||||
|
this.cancel(true)
|
||||||
|
}, 600)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
cancel(isRefresh) {
|
||||||
|
this.$emit('change', {
|
||||||
|
type: 'List',
|
||||||
|
isRefresh: !!isRefresh
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
onUserChange(e) {
|
||||||
|
if (e.length) {
|
||||||
|
this.form.girdName = e[0].girdName
|
||||||
|
} else {
|
||||||
|
this.form.girdId = []
|
||||||
|
this.form.girdName = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.time-select {
|
.time-select {
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
|
line-height: 36px;
|
||||||
|
border: 1px solid #d0d4dc;
|
||||||
|
border-radius: 4px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.el-icon-arrow-down {
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
border: 1px solid #d0d4dc;
|
|
||||||
border-radius: 4px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
cursor: pointer;
|
|
||||||
.el-icon-arrow-down {
|
|
||||||
line-height: 36px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user