Commit fda702be by xinla

Merge branch 'master' into develop

2 parents deb247d6 43764a5c
import request from '@/utils/request' import request from '@/utils/request'
const service = window.lwConfig.services.wecom const service = window.lwConfig.services.wecom
const weChat = window.lwConfig.services.weChat
/** /**
* 获取应用的jsapi_ticket * 获取应用的jsapi_ticket
...@@ -17,7 +18,7 @@ export function getAgentTicket (url) { ...@@ -17,7 +18,7 @@ export function getAgentTicket (url) {
export function getWxTicket (data) { export function getWxTicket (data) {
return request({ return request({
url: service + '/ticket/getWxTicket', url: weChat + '/ticket/getWxTicket',
params: { params: {
url: data, url: data,
}, },
......
...@@ -101,33 +101,12 @@ export async function getWxCode () { ...@@ -101,33 +101,12 @@ export async function getWxCode () {
} }
return userinfo return userinfo
} }
//缓存中没有用户信息,进入授权流程
// let appId = 'wxa57479bcd3f15461'
let appId = window.lwConfig.appId // 微信公众号id
// let appId = 'wxa57479bcd3f15461' // 公众号appid
let code = getQueryValue('code') //是否存在code let code = getQueryValue('code') //是否存在code
// let query = param2Obj() //
// let { code, appId, secret } = query
let local = window.location.origin.includes('localhost')
? 'http://h5.linkwechat.cn/test.html'
: window.location.href
if (!code) { if (!code) {
//不存在就打开上面的地址进行授权 let url = (await getWxRedirect()).data
let url = ''
if (appId) {
url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${encodeURIComponent(
local
)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
} else {
url = (await getWxRedirect()).data
let id = getQueryValue('appid', url) let id = getQueryValue('appid', url)
sessionStorage.setItem('weAppId', id) sessionStorage.setItem('weAppId', id)
}
window.location.href = url window.location.href = url
// return new Promise(() => { })
// window.location.href =
// `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(local)}&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect`;
} }
try { try {
if (code) { if (code) {
...@@ -137,11 +116,11 @@ export async function getWxCode () { ...@@ -137,11 +116,11 @@ export async function getWxCode () {
sessionStorage.setItem('userinfo', JSON.stringify(dataUser)) sessionStorage.setItem('userinfo', JSON.stringify(dataUser))
return dataUser return dataUser
} }
} catch (error) { } catch (error) {
// alert(JSON.stringify(error))
return Promise.reject() return Promise.reject()
}
} }
}
// 日期时间格式化 // 日期时间格式化
export function dateFormat (dateString, fmt = 'yyyy-MM-dd hh:mm:ss') { export function dateFormat (dateString, fmt = 'yyyy-MM-dd hh:mm:ss') {
......
...@@ -47,6 +47,8 @@ ...@@ -47,6 +47,8 @@
"benz-amr-recorder": "^1.1.3", "benz-amr-recorder": "^1.1.3",
"clipboard": "2.0.4", "clipboard": "2.0.4",
"core-js": "^3.20.2", "core-js": "^3.20.2",
"cos-js-sdk-v5": "^1.4.11",
"crypto-js": "^4.1.1",
"driver.js": "^0.9.8", "driver.js": "^0.9.8",
"echarts": "^5.3.0", "echarts": "^5.3.0",
"element-ui": "^2.15.7", "element-ui": "^2.15.7",
...@@ -63,9 +65,11 @@ ...@@ -63,9 +65,11 @@
"nprogress": "0.2.0", "nprogress": "0.2.0",
"path-to-regexp": "2.4.0", "path-to-regexp": "2.4.0",
"promise.prototype.finally": "^3.1.2", "promise.prototype.finally": "^3.1.2",
"qrcodejs2": "0.0.2",
"screenfull": "4.2.0", "screenfull": "4.2.0",
"sortablejs": "1.8.4", "sortablejs": "1.8.4",
"uuid": "^8.3.2", "uuid": "^8.3.2",
"vant": "^2.12.50",
"video.js": "^7.11.4", "video.js": "^7.11.4",
"videojs-contrib-hls": "^5.15.0", "videojs-contrib-hls": "^5.15.0",
"vue": "2.6.10", "vue": "2.6.10",
...@@ -76,6 +80,7 @@ ...@@ -76,6 +80,7 @@
"vue-quill-editor": "3.0.6", "vue-quill-editor": "3.0.6",
"vue-router": "3.5.3", "vue-router": "3.5.3",
"vue-super-flow": "^1.3.8", "vue-super-flow": "^1.3.8",
"vuedraggable": "^2.24.3",
"vuex": "3.1.0" "vuex": "3.1.0"
}, },
"devDependencies": { "devDependencies": {
...@@ -99,6 +104,7 @@ ...@@ -99,6 +104,7 @@
"lint-staged": "8.1.5", "lint-staged": "8.1.5",
"mockjs": "1.0.1-beta3", "mockjs": "1.0.1-beta3",
"plop": "2.3.0", "plop": "2.3.0",
"quill-image-extend-module": "^1.1.2",
"runjs": "4.3.2", "runjs": "4.3.2",
"sass": "^1.47.0", "sass": "^1.47.0",
"sass-loader": "8.0.2", "sass-loader": "8.0.2",
......
<script> <script>
import { getDeptTree, getDeptUser } from '@/api/organization' import { getDeptTree, getDeptUser } from '@/api/organization'
import { createUniqueString } from '@/utils'
export default { export default {
name: 'SelectUser', name: 'SelectUser',
components: {}, components: {},
...@@ -49,7 +47,12 @@ ...@@ -49,7 +47,12 @@
return { return {
treeData: [], treeData: [],
userList: [], userList: [],
defaultKeys: [] defaultKeys: [],
deptId: '', //根部门Id
keywords: '',
searchResult: [],
searchState: false,
checked: []
} }
}, },
watch: { watch: {
...@@ -86,11 +89,7 @@ ...@@ -86,11 +89,7 @@
label: 'name', label: 'name',
children: 'children', children: 'children',
disabled(data, node) { disabled(data, node) {
return ( return (that.isOnlyLeaf && data.isParty) || that.disabledValues.some((e) => e == (data.userId || data.id))
(that.isOnlyLeaf && data.isParty) ||
that.disabledValues.some((e) => e == (data.userId || data.id)) ||
data.userId === ''
)
}, },
isLeaf(data, node) { isLeaf(data, node) {
return !data.id return !data.id
...@@ -101,6 +100,45 @@ ...@@ -101,6 +100,45 @@
created() {}, created() {},
mounted() {}, mounted() {},
methods: { methods: {
setChange(e) {
if (!e) {
this.searchState = false
this.$refs.tree.setCheckedKeys(this.userList.map((e) => e.userId || e.id))
}
},
setSearch() {
if (!this.keywords) return
this.searchResult = []
this.searchState = true
this.checked = this.userList.map((dd) => {
return dd.userId
})
getDeptUser({
deptId: this.deptId,
userName: this.keywords
}).then((res) => {
this.searchResult = this.handleUser(res.rows)
})
},
setSelectChange(e, index) {
if (e) {
if (this.isSigleSelect) {
this.userList[0] = this.searchResult[index]
} else {
this.userList.push(this.searchResult[index])
}
this.checked = this.userList.map((dd) => {
return dd.userId
})
this.$forceUpdate()
} else {
this.cancle(this.searchResult[index].userId)
}
setTimeout(() => {
this.keywords = ''
this.setChange()
}, 500)
},
treeFormat(list) { treeFormat(list) {
let dealOptions = [] let dealOptions = []
list.forEach((one) => { list.forEach((one) => {
...@@ -126,21 +164,15 @@ ...@@ -126,21 +164,15 @@
this.userList = [] this.userList = []
} }
getDeptTree().then(({ data }) => { getDeptTree().then(({ data }) => {
// data.forEach((element) => {
// element.key = createUniqueString()
// })
let _data = this.handleDepart(data) let _data = this.handleDepart(data)
resolve(this.treeFormat(_data)) let value = this.treeFormat(_data)
// api.getList({ department: _data[0].id }).then(({ rows, total }) => { if (value.length) {
// _data && rows.unshift(..._data); this.deptId = value[0].deptId
// resolve(rows); }
// }); resolve(value)
}) })
} else { } else {
getDeptUser({ deptId: node.data.id }).then(({ rows }) => { getDeptUser({ deptId: node.data.id }).then(({ rows }) => {
// rows.forEach((element) => {
// element.key = createUniqueString()
// })
let arr = this.handleUser(rows) let arr = this.handleUser(rows)
node.data.children && arr.push(...node.data.children) node.data.children && arr.push(...node.data.children)
resolve(arr) resolve(arr)
...@@ -223,6 +255,31 @@ ...@@ -223,6 +255,31 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12" :xs="24"> <el-col :span="12" :xs="24">
<div class="head-container"> <div class="head-container">
<div class="search-input">
<el-input
size="mini"
v-model="keywords"
@keyup.enter.native="setSearch"
placeholder="请输入员工名称"
clearable
@change="setChange"
>
<el-button slot="append" icon="el-icon-search" @click="setSearch"></el-button>
</el-input>
</div>
<div class="search-list user-list" v-show="searchState">
<el-checkbox-group v-model="checked">
<el-row v-for="(item, index) in searchResult" :key="index">
<el-checkbox :label="item.userId" :key="index" @change="setSelectChange($event, index)">
<div>
{{ item.name }}
</div>
</el-checkbox>
</el-row>
</el-checkbox-group>
</div>
<transition name="fade">
<div class="head-container" v-show="!searchState">
<el-tree <el-tree
node-key="nodeKey" node-key="nodeKey"
ref="tree" ref="tree"
...@@ -236,9 +293,8 @@ ...@@ -236,9 +293,8 @@
:check-strictly="isOnlyLeaf" :check-strictly="isOnlyLeaf"
@check-change="handleCheckChange" @check-change="handleCheckChange"
></el-tree> ></el-tree>
<!-- :default-checked-keys=" </div>
defaultValues.map((e) => (isOnlyLeaf ? e.userId : e.userId || e.id)) </transition>
" -->
</div> </div>
</el-col> </el-col>
<el-col :span="12" :xs="24" class="user-list"> <el-col :span="12" :xs="24" class="user-list">
...@@ -258,9 +314,32 @@ ...@@ -258,9 +314,32 @@
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.content {
min-height: 400px;
}
.search-input {
margin-top: 5px;
margin-bottom: 10px;
}
.user-list { .user-list {
.el-row { .el-row {
line-height: 26px; line-height: 26px;
} }
} }
.search-list {
margin-top: 20px;
padding: 0 10px;
}
.fade-enter-active {
transition: opacity 0.5s;
}
.fade-enter {
opacity: 0;
}
.fade-leave-active {
transition: opacity 0.5s;
}
.fade-leave-to {
opacity: 0;
}
</style> </style>
<script> <script>
import { getDeptTree, getDeptUser } from '@/api/organization' import { getDeptTree, getDeptUser } from '@/api/organization'
import { createUniqueString } from '@/utils'
export default { export default {
name: 'SelectWeUser', name: 'SelectWeUser',
components: {}, components: {},
...@@ -45,7 +43,12 @@ ...@@ -45,7 +43,12 @@
return { return {
treeData: [], treeData: [],
userList: [], userList: [],
defaultKeys: [] defaultKeys: [],
deptId: '', //根部门Id
keywords: '',
searchResult: [],
searchState: false,
checked: []
} }
}, },
watch: { watch: {
...@@ -90,11 +93,7 @@ ...@@ -90,11 +93,7 @@
label: 'name', label: 'name',
children: 'children', children: 'children',
disabled(data, node) { disabled(data, node) {
return ( return (that.isOnlyLeaf && data.isParty) || that.disabledValues.some((e) => e == (data.userId || data.id))
(that.isOnlyLeaf && data.isParty) ||
that.disabledValues.some((e) => e == (data.userId || data.id)) ||
data.userId === ''
)
}, },
isLeaf(data, node) { isLeaf(data, node) {
return !data.id return !data.id
...@@ -105,6 +104,45 @@ ...@@ -105,6 +104,45 @@
created() {}, created() {},
mounted() {}, mounted() {},
methods: { methods: {
setChange(e) {
if (!e) {
this.searchState = false
this.$refs.tree.setCheckedKeys(this.userList.map((e) => e.userId || e.id))
}
},
setSearch() {
if (!this.keywords) return
this.searchResult = []
this.searchState = true
this.checked = this.userList.map((dd) => {
return dd.userId
})
getDeptUser({
deptId: this.deptId,
userName: this.keywords
}).then((res) => {
this.searchResult = this.handleName(res.rows)
})
},
setSelectChange(e, index) {
if (e) {
if (this.isSigleSelect) {
this.userList[0] = this.searchResult[index]
} else {
this.userList.push(this.searchResult[index])
}
this.checked = this.userList.map((dd) => {
return dd.userId
})
this.$forceUpdate()
} else {
this.cancle(this.searchResult[index].userId)
}
setTimeout(() => {
this.keywords = ''
this.setChange()
}, 500)
},
treeFormat(list) { treeFormat(list) {
let dealOptions = [] let dealOptions = []
list.forEach((one) => { list.forEach((one) => {
...@@ -129,23 +167,16 @@ ...@@ -129,23 +167,16 @@
if (!Array.isArray(this.defaultValues) || this.defaultValues.length == 0) { if (!Array.isArray(this.defaultValues) || this.defaultValues.length == 0) {
this.userList = [] this.userList = []
} }
console.log(this.defaultValues)
getDeptTree().then(({ data }) => { getDeptTree().then(({ data }) => {
// data.forEach((element) => {
// element.key = createUniqueString()
// })
let _data = this.handleTree(data) let _data = this.handleTree(data)
resolve(this.treeFormat(_data)) let value = this.treeFormat(_data)
// api.getList({ department: _data[0].id }).then(({ rows, total }) => { if (value.length) {
// _data && rows.unshift(..._data); this.deptId = value[0].deptId
// resolve(rows); }
// }); resolve(value)
}) })
} else { } else {
getDeptUser({ deptId: node.data.id }).then(({ rows }) => { getDeptUser({ deptId: node.data.id }).then(({ rows }) => {
// rows.forEach((element) => {
// element.key = createUniqueString()
// })
let arr = this.handleName(rows) let arr = this.handleName(rows)
node.data.children && arr.push(...node.data.children) node.data.children && arr.push(...node.data.children)
resolve(arr) resolve(arr)
...@@ -166,7 +197,7 @@ ...@@ -166,7 +197,7 @@
handleName(data) { handleName(data) {
return data.map((i) => { return data.map((i) => {
if (i.userName) { if (i.userName) {
i.userId = i.weUserId ? i.weUserId : '' i.userId = i.weUserId
i.name = i.userName i.name = i.userName
} }
return i return i
...@@ -174,7 +205,6 @@ ...@@ -174,7 +205,6 @@
}, },
// 选择变化 // 选择变化
handleCheckChange(data, checked, indeterminate) { handleCheckChange(data, checked, indeterminate) {
// console.log(arguments)
if (checked) { if (checked) {
if (this.isSigleSelect) { if (this.isSigleSelect) {
// 单选情况 // 单选情况
...@@ -189,11 +219,9 @@ ...@@ -189,11 +219,9 @@
!isExist && this.userList.push(data) !isExist && this.userList.push(data)
} }
} else { } else {
// let index = this.userList.indexOf(data)
let index = this.userList.findIndex((i) => i.userId === data.userId) let index = this.userList.findIndex((i) => i.userId === data.userId)
index > -1 && this.userList.splice(index, 1) index > -1 && this.userList.splice(index, 1)
} }
// console.log(data, checked, indeterminate);
this.userList = this.unique(this.userList) this.userList = this.unique(this.userList)
}, },
unique(arr) { unique(arr) {
...@@ -225,9 +253,33 @@ ...@@ -225,9 +253,33 @@
</script> </script>
<template> <template>
<el-dialog :title="title" :visible.sync="Pvisible" :close-on-click-modal="false" :destroy-on-close="destroyOnClose"> <el-dialog :title="title" :visible.sync="Pvisible" :close-on-click-modal="false" :destroy-on-close="destroyOnClose">
<el-row :gutter="20"> <el-row :gutter="20" class="content">
<el-col :span="12" :xs="24"> <el-col :span="12" :xs="24">
<div class="head-container"> <div class="search-input">
<el-input
size="mini"
v-model="keywords"
@keyup.enter.native="setSearch"
placeholder="请输入员工名称"
clearable
@change="setChange"
>
<el-button slot="append" icon="el-icon-search" @click="setSearch"></el-button>
</el-input>
</div>
<div class="search-list user-list" v-show="searchState">
<el-checkbox-group v-model="checked">
<el-row v-for="(item, index) in searchResult" :key="index">
<el-checkbox :label="item.userId" :key="index" @change="setSelectChange($event, index)">
<div>
{{ item.name }}
</div>
</el-checkbox>
</el-row>
</el-checkbox-group>
</div>
<transition name="fade">
<div class="head-container" v-show="!searchState">
<el-tree <el-tree
node-key="userId" node-key="userId"
ref="tree" ref="tree"
...@@ -241,10 +293,8 @@ ...@@ -241,10 +293,8 @@
:check-strictly="isOnlyLeaf" :check-strictly="isOnlyLeaf"
@check-change="handleCheckChange" @check-change="handleCheckChange"
></el-tree> ></el-tree>
<!-- :default-checked-keys="
defaultValues.map((e) => (isOnlyLeaf ? e.userId : e.userId || e.id))
" -->
</div> </div>
</transition>
</el-col> </el-col>
<el-col :span="12" :xs="24" class="user-list"> <el-col :span="12" :xs="24" class="user-list">
<el-row :gutter="10">选择人员列表</el-row> <el-row :gutter="10">选择人员列表</el-row>
...@@ -263,9 +313,32 @@ ...@@ -263,9 +313,32 @@
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.content {
min-height: 400px;
}
.search-input {
margin-top: 5px;
margin-bottom: 10px;
}
.user-list { .user-list {
.el-row { .el-row {
line-height: 26px; line-height: 26px;
} }
} }
.search-list {
margin-top: 20px;
padding: 0 10px;
}
.fade-enter-active {
transition: opacity 0.5s;
}
.fade-enter {
opacity: 0;
}
.fade-leave-active {
transition: opacity 0.5s;
}
.fade-leave-to {
opacity: 0;
}
</style> </style>
...@@ -3,27 +3,23 @@ ...@@ -3,27 +3,23 @@
<div class="add-sensitive-word"> <div class="add-sensitive-word">
<el-form :inline="true" :model="form" class="demo-form-inline"> <el-form :inline="true" :model="form" class="demo-form-inline">
<el-form-item label=""> <el-form-item label="">
<el-button type="primary" class="add-btn" icon="el-icon-plus" @click="addSensitive" <el-button type="primary" class="add-btn" icon="el-icon-plus" @click="addSensitive">添加敏感词</el-button>
>添加敏感词</el-button
>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="form.patternWords" placeholder="搜索关键词" style="width: 300px"> <el-input v-model="form.patternWords" placeholder="搜索关键词" style="width: 300px;">
<el-button slot="prepend" icon="el-icon-search" @click="getSettingList"></el-button> <el-button slot="prepend" icon="el-icon-search" @click="getSettingList"></el-button>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table :data="tableData" stripe style="width: 100%;" :header-cell-style="{ background: '#fff' }">
:data="tableData"
stripe
style="width: 100%"
:header-cell-style="{ background: '#fff' }"
>
<el-table-column prop="strategyName" label="策略名称"> </el-table-column> <el-table-column prop="strategyName" label="策略名称"> </el-table-column>
<el-table-column prop="patternWords" label="匹配词"> </el-table-column> <el-table-column prop="patternWords" label="匹配词"> </el-table-column>
<el-table-column prop="auditScopeName" label="审计范围"> <el-table-column prop="auditScopeName" label="审计范围">
<template slot-scope="scope"> <template slot-scope="{ row }">
<el-tag size="medium">{{ scope.row.auditUserScope[0].auditScopeName }}</el-tag> <template v-if="row.auditUserScope && row.auditUserScope.length">
<TagEllipsis :list="row.auditUserScope[0].auditScopeName.split(',')"></TagEllipsis>
</template>
<template v-else>全体成员</template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="auditUserName" label="审计人"> </el-table-column> <el-table-column prop="auditUserName" label="审计人"> </el-table-column>
...@@ -39,12 +35,8 @@ ...@@ -39,12 +35,8 @@
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
>修改</el-button <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -56,13 +48,7 @@ ...@@ -56,13 +48,7 @@
@pagination="getSettingList()" @pagination="getSettingList()"
/> />
<!-- 添加敏感词 --> <!-- 添加敏感词 -->
<el-dialog <el-dialog title="添加敏感词" :visible.sync="open" width="600px" append-to-body :close-on-click-modal="false">
title="添加敏感词"
:visible.sync="open"
width="600px"
append-to-body
:close-on-click-modal="false"
>
<el-form ref="addForm" :model="addForm" :rules="rules" label-width="130px"> <el-form ref="addForm" :model="addForm" :rules="rules" label-width="130px">
<el-form-item label="敏感词策略名称" prop="strategyName"> <el-form-item label="敏感词策略名称" prop="strategyName">
<el-input v-model="addForm.strategyName" placeholder="例:红包" /> <el-input v-model="addForm.strategyName" placeholder="例:红包" />
...@@ -72,26 +58,22 @@ ...@@ -72,26 +58,22 @@
<div class="sub-title">匹配词间用逗号隔开</div> <div class="sub-title">匹配词间用逗号隔开</div>
</el-form-item> </el-form-item>
<el-form-item label="审计范围" :error="rangeErrorMsg"> <el-form-item label="审计范围" :error="rangeErrorMsg">
<div class="tag-input" style="width: auto" @click="openAuditUserRange"> <div class="tag-input" style="width: auto;" @click="openAuditUserRange">
<span class="tag-place" v-if="!auditUserRange.length" <span class="tag-place" v-if="!auditUserRange.length"
>请选择<span class="prompt-title">若不选择,则默认全体成员</span></span >请选择<span class="prompt-title">若不选择,则默认全体成员</span></span
> >
<template v-else> <template v-else>
<el-tag type="info" v-for="(unit, unique) in auditUserRange" :key="unique">{{ <el-tag type="info" v-for="(unit, unique) in auditUserRange" :key="unique">{{ unit.name }}</el-tag>
unit.name
}}</el-tag>
</template> </template>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="审计人" :required="true" :error="errorMsg"> <el-form-item label="审计人" :required="true" :error="errorMsg">
<div class="tag-input" style="width: auto" @click="openAuditUser"> <div class="tag-input" style="width: auto;" @click="openAuditUser">
<span class="tag-place" v-if="!auditUser.length" <span class="tag-place" v-if="!auditUser.length"
>请选择<span class="prompt-title">请选择部门负责人</span></span >请选择<span class="prompt-title">请选择部门负责人</span></span
> >
<template v-else> <template v-else>
<el-tag type="info" v-for="(unit, unique) in auditUser" :key="unique">{{ <el-tag type="info" v-for="(unit, unique) in auditUser" :key="unique">{{ unit.name }}</el-tag>
unit.name
}}</el-tag>
</template> </template>
</div> </div>
</el-form-item> </el-form-item>
...@@ -105,11 +87,7 @@ ...@@ -105,11 +87,7 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 选择审计范围弹窗 --> <!-- 选择审计范围弹窗 -->
<SelectUser <SelectUser :visible.sync="dialogVisibleSelectUser" title="选择添加人" @success="selectedUser"></SelectUser>
:visible.sync="dialogVisibleSelectUser"
title="选择添加人"
@success="selectedUser"
></SelectUser>
<!-- 选择审计人弹窗 --> <!-- 选择审计人弹窗 -->
<SelectUser <SelectUser
:visible.sync="dialogVisibleSelectAuditUser" :visible.sync="dialogVisibleSelectAuditUser"
...@@ -120,9 +98,9 @@ ...@@ -120,9 +98,9 @@
</div> </div>
</template> </template>
<script> <script>
import * as sensitiveApis from '@/api/conversation/security' import * as sensitiveApis from '@/api/conversation/security'
import SelectUser from '@/components/SelectUser' import SelectUser from '@/components/SelectUser'
export default { export default {
components: { components: {
SelectUser SelectUser
}, },
...@@ -192,6 +170,7 @@ export default { ...@@ -192,6 +170,7 @@ export default {
this.rangeErrorMsg = '' this.rangeErrorMsg = ''
} }
const params = this.addForm const params = this.addForm
if (this.auditUserRange.length) {
let auditUserScope = [] let auditUserScope = []
const obj = { const obj = {
scopeType: 2, // this.auditUserRange.map((d) => d.department) + '', scopeType: 2, // this.auditUserRange.map((d) => d.department) + '',
...@@ -200,6 +179,9 @@ export default { ...@@ -200,6 +179,9 @@ export default {
} }
auditUserScope.push(obj) auditUserScope.push(obj)
params.auditUserScope = auditUserScope params.auditUserScope = auditUserScope
} else {
params.auditUserScope = []
}
params.auditUserId = this.auditUser.map((d) => d.userId) + '' params.auditUserId = this.auditUser.map((d) => d.userId) + ''
params.auditUserName = this.auditUser.map((d) => d.name) + '' params.auditUserName = this.auditUser.map((d) => d.name) + ''
params.alertFlag = this.alertFlag params.alertFlag = this.alertFlag
...@@ -258,7 +240,7 @@ export default { ...@@ -258,7 +240,7 @@ export default {
}, },
// 修改敏感词 // 修改敏感词
handleUpdate(row) { handleUpdate(row) {
// console.log(row) console.log(row)
this.submitFlag = 'modify' this.submitFlag = 'modify'
this.errorMsg = '' this.errorMsg = ''
this.rowId = row.id this.rowId = row.id
...@@ -295,29 +277,29 @@ export default { ...@@ -295,29 +277,29 @@ export default {
}, },
handleStatusChange(row) {} handleStatusChange(row) {}
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.demo-form-inline { .demo-form-inline {
background: #efefef; background: #efefef;
padding: 18px 10px 0 10px; padding: 18px 10px 0 10px;
} }
::v-deep .add-btn { ::v-deep .add-btn {
margin-right: 10px; margin-right: 10px;
} }
.content { .content {
margin-top: 15px; margin-top: 15px;
padding: 10px; padding: 10px;
} }
.prompt-title { .prompt-title {
margin-left: 10px; margin-left: 10px;
color: #999; color: #999;
} }
.tag-place { .tag-place {
color: #1890ff; color: #1890ff;
} }
.sub-title { .sub-title {
font-size: 13px; font-size: 13px;
color: #999; color: #999;
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!