diff --git a/src/api/userReply/userReply.js b/src/api/userReply/userReply.js
new file mode 100644
index 0000000..846335f
--- /dev/null
+++ b/src/api/userReply/userReply.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 获取常用语查询列表
+export function getUserReplyList(params) {
+ return request({
+ url: '/userReply/list',
+ method: 'get',
+ params
+ })
+}
+// 用户常用语分页列表
+export function getListPage(params) {
+ return request({
+ url: '/userReply/listPage',
+ method: 'get',
+ params
+ })
+}
+export function add(params) {
+ return request({
+ url: '/userReply/add',
+ method: 'post',
+ params
+ })
+}
+export function update(params) {
+ return request({
+ url: '/userReply/update',
+ method: 'post',
+ params
+ })
+}
+// 用户常用语删除接口
+export function del(params) {
+ console.log(params)
+ return request({
+ url: '/userReply/delete',
+ method: 'post',
+ params: {
+ userReplyId: params
+ }
+ })
+}
+
diff --git a/src/api/userReply/userReply.js b/src/api/userReply/userReply.js
new file mode 100644
index 0000000..846335f
--- /dev/null
+++ b/src/api/userReply/userReply.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 获取常用语查询列表
+export function getUserReplyList(params) {
+ return request({
+ url: '/userReply/list',
+ method: 'get',
+ params
+ })
+}
+// 用户常用语分页列表
+export function getListPage(params) {
+ return request({
+ url: '/userReply/listPage',
+ method: 'get',
+ params
+ })
+}
+export function add(params) {
+ return request({
+ url: '/userReply/add',
+ method: 'post',
+ params
+ })
+}
+export function update(params) {
+ return request({
+ url: '/userReply/update',
+ method: 'post',
+ params
+ })
+}
+// 用户常用语删除接口
+export function del(params) {
+ console.log(params)
+ return request({
+ url: '/userReply/delete',
+ method: 'post',
+ params: {
+ userReplyId: params
+ }
+ })
+}
+
diff --git a/src/components/CaseCommon/caseDetail.vue b/src/components/CaseCommon/caseDetail.vue
index 1f0a735..3456b30 100644
--- a/src/components/CaseCommon/caseDetail.vue
+++ b/src/components/CaseCommon/caseDetail.vue
@@ -320,12 +320,16 @@
-
+
+
+
@@ -364,6 +368,7 @@
import 'element-ui/lib/theme-chalk/index.css'
import { getCaseDetail, getUserList, getDeptList, getCaseTypeList, getCaseTypeDetailList, getCaseTypeTimes } from '@/api/coorBusiness/case'
import { getCommonLanguage, getFilingTypeList, getCaseLevelList, getEorc } from '@/api/coorBusiness/dict'
+import { getUserReplyList } from '@/api/userReply/userReply'
import { historicalRecords, nextNodes, completeCaseTask } from '@/api/coorBusiness/process'
import LeafletMapRead from '@/components/Map/leafletMapRead'
import { radioMap } from './radioMap'
@@ -517,8 +522,15 @@
}
// 查询常用语列表
- const languageRes = await getCommonLanguage()
- this.commonLanguageList = languageRes.data
+ const languageRes = await getUserReplyList()
+
+ if (languageRes.data) {
+ const options = languageRes.data.filter(option => option.type === '2')
+ if (options.length > 0) {
+ this.commonLanguageList.push({ label: '个人常用语', options: options })
+ }
+ this.commonLanguageList.push({ label: '固定常用语', options: languageRes.data.filter(option => option.type === '1') })
+ }
// 查询流转记录接口
this.processForm.processId = this.caseDetail.processId
@@ -894,7 +906,7 @@
}
this.processForm.dispatchDeptId = this.processCompObj.dispatchDeptId
} else if (radioConfig.passBack === 'onedeptid') {
- if(this.caseDetail.onedeptid) {
+ if (this.caseDetail.onedeptid) {
this.processForm.dispatchDeptId = this.caseDetail.onedeptid
}
}
diff --git a/src/api/userReply/userReply.js b/src/api/userReply/userReply.js
new file mode 100644
index 0000000..846335f
--- /dev/null
+++ b/src/api/userReply/userReply.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 获取常用语查询列表
+export function getUserReplyList(params) {
+ return request({
+ url: '/userReply/list',
+ method: 'get',
+ params
+ })
+}
+// 用户常用语分页列表
+export function getListPage(params) {
+ return request({
+ url: '/userReply/listPage',
+ method: 'get',
+ params
+ })
+}
+export function add(params) {
+ return request({
+ url: '/userReply/add',
+ method: 'post',
+ params
+ })
+}
+export function update(params) {
+ return request({
+ url: '/userReply/update',
+ method: 'post',
+ params
+ })
+}
+// 用户常用语删除接口
+export function del(params) {
+ console.log(params)
+ return request({
+ url: '/userReply/delete',
+ method: 'post',
+ params: {
+ userReplyId: params
+ }
+ })
+}
+
diff --git a/src/components/CaseCommon/caseDetail.vue b/src/components/CaseCommon/caseDetail.vue
index 1f0a735..3456b30 100644
--- a/src/components/CaseCommon/caseDetail.vue
+++ b/src/components/CaseCommon/caseDetail.vue
@@ -320,12 +320,16 @@
-
+
+
+
@@ -364,6 +368,7 @@
import 'element-ui/lib/theme-chalk/index.css'
import { getCaseDetail, getUserList, getDeptList, getCaseTypeList, getCaseTypeDetailList, getCaseTypeTimes } from '@/api/coorBusiness/case'
import { getCommonLanguage, getFilingTypeList, getCaseLevelList, getEorc } from '@/api/coorBusiness/dict'
+import { getUserReplyList } from '@/api/userReply/userReply'
import { historicalRecords, nextNodes, completeCaseTask } from '@/api/coorBusiness/process'
import LeafletMapRead from '@/components/Map/leafletMapRead'
import { radioMap } from './radioMap'
@@ -517,8 +522,15 @@
}
// 查询常用语列表
- const languageRes = await getCommonLanguage()
- this.commonLanguageList = languageRes.data
+ const languageRes = await getUserReplyList()
+
+ if (languageRes.data) {
+ const options = languageRes.data.filter(option => option.type === '2')
+ if (options.length > 0) {
+ this.commonLanguageList.push({ label: '个人常用语', options: options })
+ }
+ this.commonLanguageList.push({ label: '固定常用语', options: languageRes.data.filter(option => option.type === '1') })
+ }
// 查询流转记录接口
this.processForm.processId = this.caseDetail.processId
@@ -894,7 +906,7 @@
}
this.processForm.dispatchDeptId = this.processCompObj.dispatchDeptId
} else if (radioConfig.passBack === 'onedeptid') {
- if(this.caseDetail.onedeptid) {
+ if (this.caseDetail.onedeptid) {
this.processForm.dispatchDeptId = this.caseDetail.onedeptid
}
}
diff --git a/src/main.js b/src/main.js
index cac8a4c..23041fc 100644
--- a/src/main.js
+++ b/src/main.js
@@ -26,13 +26,14 @@
import 'babel-polyfill'
// import '../mock' // simulation data
-import { hasPermission, showWellType, showDeviceType, showIpConfig, isOperation } from './utils/permission'
+import { hasPermission, showWellType, showDeviceType, showIpConfig, isOperation, isAdmin } from './utils/permission'
Vue.prototype.hasPerm = hasPermission
Vue.prototype.showWellType = showWellType
Vue.prototype.showDeviceType = showDeviceType
Vue.prototype.showIpConfig = showIpConfig
Vue.prototype.isOperation = isOperation
+Vue.prototype.isAdmin = isAdmin
// 引入Element-ui
Vue.use(ElementUI, { locale })
diff --git a/src/api/userReply/userReply.js b/src/api/userReply/userReply.js
new file mode 100644
index 0000000..846335f
--- /dev/null
+++ b/src/api/userReply/userReply.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 获取常用语查询列表
+export function getUserReplyList(params) {
+ return request({
+ url: '/userReply/list',
+ method: 'get',
+ params
+ })
+}
+// 用户常用语分页列表
+export function getListPage(params) {
+ return request({
+ url: '/userReply/listPage',
+ method: 'get',
+ params
+ })
+}
+export function add(params) {
+ return request({
+ url: '/userReply/add',
+ method: 'post',
+ params
+ })
+}
+export function update(params) {
+ return request({
+ url: '/userReply/update',
+ method: 'post',
+ params
+ })
+}
+// 用户常用语删除接口
+export function del(params) {
+ console.log(params)
+ return request({
+ url: '/userReply/delete',
+ method: 'post',
+ params: {
+ userReplyId: params
+ }
+ })
+}
+
diff --git a/src/components/CaseCommon/caseDetail.vue b/src/components/CaseCommon/caseDetail.vue
index 1f0a735..3456b30 100644
--- a/src/components/CaseCommon/caseDetail.vue
+++ b/src/components/CaseCommon/caseDetail.vue
@@ -320,12 +320,16 @@
-
+
+
+
@@ -364,6 +368,7 @@
import 'element-ui/lib/theme-chalk/index.css'
import { getCaseDetail, getUserList, getDeptList, getCaseTypeList, getCaseTypeDetailList, getCaseTypeTimes } from '@/api/coorBusiness/case'
import { getCommonLanguage, getFilingTypeList, getCaseLevelList, getEorc } from '@/api/coorBusiness/dict'
+import { getUserReplyList } from '@/api/userReply/userReply'
import { historicalRecords, nextNodes, completeCaseTask } from '@/api/coorBusiness/process'
import LeafletMapRead from '@/components/Map/leafletMapRead'
import { radioMap } from './radioMap'
@@ -517,8 +522,15 @@
}
// 查询常用语列表
- const languageRes = await getCommonLanguage()
- this.commonLanguageList = languageRes.data
+ const languageRes = await getUserReplyList()
+
+ if (languageRes.data) {
+ const options = languageRes.data.filter(option => option.type === '2')
+ if (options.length > 0) {
+ this.commonLanguageList.push({ label: '个人常用语', options: options })
+ }
+ this.commonLanguageList.push({ label: '固定常用语', options: languageRes.data.filter(option => option.type === '1') })
+ }
// 查询流转记录接口
this.processForm.processId = this.caseDetail.processId
@@ -894,7 +906,7 @@
}
this.processForm.dispatchDeptId = this.processCompObj.dispatchDeptId
} else if (radioConfig.passBack === 'onedeptid') {
- if(this.caseDetail.onedeptid) {
+ if (this.caseDetail.onedeptid) {
this.processForm.dispatchDeptId = this.caseDetail.onedeptid
}
}
diff --git a/src/main.js b/src/main.js
index cac8a4c..23041fc 100644
--- a/src/main.js
+++ b/src/main.js
@@ -26,13 +26,14 @@
import 'babel-polyfill'
// import '../mock' // simulation data
-import { hasPermission, showWellType, showDeviceType, showIpConfig, isOperation } from './utils/permission'
+import { hasPermission, showWellType, showDeviceType, showIpConfig, isOperation, isAdmin } from './utils/permission'
Vue.prototype.hasPerm = hasPermission
Vue.prototype.showWellType = showWellType
Vue.prototype.showDeviceType = showDeviceType
Vue.prototype.showIpConfig = showIpConfig
Vue.prototype.isOperation = isOperation
+Vue.prototype.isAdmin = isAdmin
// 引入Element-ui
Vue.use(ElementUI, { locale })
diff --git a/src/router/modules/system.js b/src/router/modules/system.js
index 134cb1e..59b57d7 100644
--- a/src/router/modules/system.js
+++ b/src/router/modules/system.js
@@ -54,6 +54,12 @@
component: () => import('@/views/busAdmin/areaPersonliable/areaPersonliable'),
name: 'AreaPersonliable',
meta: { title: '网格责任人管理', icon: '', permission: ['/areaPersonliable'] }
+ },
+ {
+ path: '/userReply',
+ component: () => import('@/views/busAdmin/userReply/userReplyList'),
+ name: 'userReply',
+ meta: { title: '常用语设置', icon: '', permission: ['/userReply'] }
}
]
},
diff --git a/src/api/userReply/userReply.js b/src/api/userReply/userReply.js
new file mode 100644
index 0000000..846335f
--- /dev/null
+++ b/src/api/userReply/userReply.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 获取常用语查询列表
+export function getUserReplyList(params) {
+ return request({
+ url: '/userReply/list',
+ method: 'get',
+ params
+ })
+}
+// 用户常用语分页列表
+export function getListPage(params) {
+ return request({
+ url: '/userReply/listPage',
+ method: 'get',
+ params
+ })
+}
+export function add(params) {
+ return request({
+ url: '/userReply/add',
+ method: 'post',
+ params
+ })
+}
+export function update(params) {
+ return request({
+ url: '/userReply/update',
+ method: 'post',
+ params
+ })
+}
+// 用户常用语删除接口
+export function del(params) {
+ console.log(params)
+ return request({
+ url: '/userReply/delete',
+ method: 'post',
+ params: {
+ userReplyId: params
+ }
+ })
+}
+
diff --git a/src/components/CaseCommon/caseDetail.vue b/src/components/CaseCommon/caseDetail.vue
index 1f0a735..3456b30 100644
--- a/src/components/CaseCommon/caseDetail.vue
+++ b/src/components/CaseCommon/caseDetail.vue
@@ -320,12 +320,16 @@
-
+
+
+
@@ -364,6 +368,7 @@
import 'element-ui/lib/theme-chalk/index.css'
import { getCaseDetail, getUserList, getDeptList, getCaseTypeList, getCaseTypeDetailList, getCaseTypeTimes } from '@/api/coorBusiness/case'
import { getCommonLanguage, getFilingTypeList, getCaseLevelList, getEorc } from '@/api/coorBusiness/dict'
+import { getUserReplyList } from '@/api/userReply/userReply'
import { historicalRecords, nextNodes, completeCaseTask } from '@/api/coorBusiness/process'
import LeafletMapRead from '@/components/Map/leafletMapRead'
import { radioMap } from './radioMap'
@@ -517,8 +522,15 @@
}
// 查询常用语列表
- const languageRes = await getCommonLanguage()
- this.commonLanguageList = languageRes.data
+ const languageRes = await getUserReplyList()
+
+ if (languageRes.data) {
+ const options = languageRes.data.filter(option => option.type === '2')
+ if (options.length > 0) {
+ this.commonLanguageList.push({ label: '个人常用语', options: options })
+ }
+ this.commonLanguageList.push({ label: '固定常用语', options: languageRes.data.filter(option => option.type === '1') })
+ }
// 查询流转记录接口
this.processForm.processId = this.caseDetail.processId
@@ -894,7 +906,7 @@
}
this.processForm.dispatchDeptId = this.processCompObj.dispatchDeptId
} else if (radioConfig.passBack === 'onedeptid') {
- if(this.caseDetail.onedeptid) {
+ if (this.caseDetail.onedeptid) {
this.processForm.dispatchDeptId = this.caseDetail.onedeptid
}
}
diff --git a/src/main.js b/src/main.js
index cac8a4c..23041fc 100644
--- a/src/main.js
+++ b/src/main.js
@@ -26,13 +26,14 @@
import 'babel-polyfill'
// import '../mock' // simulation data
-import { hasPermission, showWellType, showDeviceType, showIpConfig, isOperation } from './utils/permission'
+import { hasPermission, showWellType, showDeviceType, showIpConfig, isOperation, isAdmin } from './utils/permission'
Vue.prototype.hasPerm = hasPermission
Vue.prototype.showWellType = showWellType
Vue.prototype.showDeviceType = showDeviceType
Vue.prototype.showIpConfig = showIpConfig
Vue.prototype.isOperation = isOperation
+Vue.prototype.isAdmin = isAdmin
// 引入Element-ui
Vue.use(ElementUI, { locale })
diff --git a/src/router/modules/system.js b/src/router/modules/system.js
index 134cb1e..59b57d7 100644
--- a/src/router/modules/system.js
+++ b/src/router/modules/system.js
@@ -54,6 +54,12 @@
component: () => import('@/views/busAdmin/areaPersonliable/areaPersonliable'),
name: 'AreaPersonliable',
meta: { title: '网格责任人管理', icon: '', permission: ['/areaPersonliable'] }
+ },
+ {
+ path: '/userReply',
+ component: () => import('@/views/busAdmin/userReply/userReplyList'),
+ name: 'userReply',
+ meta: { title: '常用语设置', icon: '', permission: ['/userReply'] }
}
]
},
diff --git a/src/utils/permission.js b/src/utils/permission.js
index f5e6c09..4ac94c9 100644
--- a/src/utils/permission.js
+++ b/src/utils/permission.js
@@ -42,3 +42,9 @@
return (tip === 'operation' || tip === 'administrator')
})
}
+export function isAdmin() {
+ const roleTips = store.getters.roleTips
+ return roleTips.some(tip => { // 遍历btns,查找btn.url是否有匹配的permission,有则返回true,否则返回false
+ return (tip === 'administrator')
+ })
+}
diff --git a/src/api/userReply/userReply.js b/src/api/userReply/userReply.js
new file mode 100644
index 0000000..846335f
--- /dev/null
+++ b/src/api/userReply/userReply.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 获取常用语查询列表
+export function getUserReplyList(params) {
+ return request({
+ url: '/userReply/list',
+ method: 'get',
+ params
+ })
+}
+// 用户常用语分页列表
+export function getListPage(params) {
+ return request({
+ url: '/userReply/listPage',
+ method: 'get',
+ params
+ })
+}
+export function add(params) {
+ return request({
+ url: '/userReply/add',
+ method: 'post',
+ params
+ })
+}
+export function update(params) {
+ return request({
+ url: '/userReply/update',
+ method: 'post',
+ params
+ })
+}
+// 用户常用语删除接口
+export function del(params) {
+ console.log(params)
+ return request({
+ url: '/userReply/delete',
+ method: 'post',
+ params: {
+ userReplyId: params
+ }
+ })
+}
+
diff --git a/src/components/CaseCommon/caseDetail.vue b/src/components/CaseCommon/caseDetail.vue
index 1f0a735..3456b30 100644
--- a/src/components/CaseCommon/caseDetail.vue
+++ b/src/components/CaseCommon/caseDetail.vue
@@ -320,12 +320,16 @@
-
+
+
+
@@ -364,6 +368,7 @@
import 'element-ui/lib/theme-chalk/index.css'
import { getCaseDetail, getUserList, getDeptList, getCaseTypeList, getCaseTypeDetailList, getCaseTypeTimes } from '@/api/coorBusiness/case'
import { getCommonLanguage, getFilingTypeList, getCaseLevelList, getEorc } from '@/api/coorBusiness/dict'
+import { getUserReplyList } from '@/api/userReply/userReply'
import { historicalRecords, nextNodes, completeCaseTask } from '@/api/coorBusiness/process'
import LeafletMapRead from '@/components/Map/leafletMapRead'
import { radioMap } from './radioMap'
@@ -517,8 +522,15 @@
}
// 查询常用语列表
- const languageRes = await getCommonLanguage()
- this.commonLanguageList = languageRes.data
+ const languageRes = await getUserReplyList()
+
+ if (languageRes.data) {
+ const options = languageRes.data.filter(option => option.type === '2')
+ if (options.length > 0) {
+ this.commonLanguageList.push({ label: '个人常用语', options: options })
+ }
+ this.commonLanguageList.push({ label: '固定常用语', options: languageRes.data.filter(option => option.type === '1') })
+ }
// 查询流转记录接口
this.processForm.processId = this.caseDetail.processId
@@ -894,7 +906,7 @@
}
this.processForm.dispatchDeptId = this.processCompObj.dispatchDeptId
} else if (radioConfig.passBack === 'onedeptid') {
- if(this.caseDetail.onedeptid) {
+ if (this.caseDetail.onedeptid) {
this.processForm.dispatchDeptId = this.caseDetail.onedeptid
}
}
diff --git a/src/main.js b/src/main.js
index cac8a4c..23041fc 100644
--- a/src/main.js
+++ b/src/main.js
@@ -26,13 +26,14 @@
import 'babel-polyfill'
// import '../mock' // simulation data
-import { hasPermission, showWellType, showDeviceType, showIpConfig, isOperation } from './utils/permission'
+import { hasPermission, showWellType, showDeviceType, showIpConfig, isOperation, isAdmin } from './utils/permission'
Vue.prototype.hasPerm = hasPermission
Vue.prototype.showWellType = showWellType
Vue.prototype.showDeviceType = showDeviceType
Vue.prototype.showIpConfig = showIpConfig
Vue.prototype.isOperation = isOperation
+Vue.prototype.isAdmin = isAdmin
// 引入Element-ui
Vue.use(ElementUI, { locale })
diff --git a/src/router/modules/system.js b/src/router/modules/system.js
index 134cb1e..59b57d7 100644
--- a/src/router/modules/system.js
+++ b/src/router/modules/system.js
@@ -54,6 +54,12 @@
component: () => import('@/views/busAdmin/areaPersonliable/areaPersonliable'),
name: 'AreaPersonliable',
meta: { title: '网格责任人管理', icon: '', permission: ['/areaPersonliable'] }
+ },
+ {
+ path: '/userReply',
+ component: () => import('@/views/busAdmin/userReply/userReplyList'),
+ name: 'userReply',
+ meta: { title: '常用语设置', icon: '', permission: ['/userReply'] }
}
]
},
diff --git a/src/utils/permission.js b/src/utils/permission.js
index f5e6c09..4ac94c9 100644
--- a/src/utils/permission.js
+++ b/src/utils/permission.js
@@ -42,3 +42,9 @@
return (tip === 'operation' || tip === 'administrator')
})
}
+export function isAdmin() {
+ const roleTips = store.getters.roleTips
+ return roleTips.some(tip => { // 遍历btns,查找btn.url是否有匹配的permission,有则返回true,否则返回false
+ return (tip === 'administrator')
+ })
+}
diff --git a/src/views/busAdmin/userReply/editUserReply.vue b/src/views/busAdmin/userReply/editUserReply.vue
new file mode 100644
index 0000000..2a586fb
--- /dev/null
+++ b/src/views/busAdmin/userReply/editUserReply.vue
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/api/userReply/userReply.js b/src/api/userReply/userReply.js
new file mode 100644
index 0000000..846335f
--- /dev/null
+++ b/src/api/userReply/userReply.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 获取常用语查询列表
+export function getUserReplyList(params) {
+ return request({
+ url: '/userReply/list',
+ method: 'get',
+ params
+ })
+}
+// 用户常用语分页列表
+export function getListPage(params) {
+ return request({
+ url: '/userReply/listPage',
+ method: 'get',
+ params
+ })
+}
+export function add(params) {
+ return request({
+ url: '/userReply/add',
+ method: 'post',
+ params
+ })
+}
+export function update(params) {
+ return request({
+ url: '/userReply/update',
+ method: 'post',
+ params
+ })
+}
+// 用户常用语删除接口
+export function del(params) {
+ console.log(params)
+ return request({
+ url: '/userReply/delete',
+ method: 'post',
+ params: {
+ userReplyId: params
+ }
+ })
+}
+
diff --git a/src/components/CaseCommon/caseDetail.vue b/src/components/CaseCommon/caseDetail.vue
index 1f0a735..3456b30 100644
--- a/src/components/CaseCommon/caseDetail.vue
+++ b/src/components/CaseCommon/caseDetail.vue
@@ -320,12 +320,16 @@
-
+
+
+
@@ -364,6 +368,7 @@
import 'element-ui/lib/theme-chalk/index.css'
import { getCaseDetail, getUserList, getDeptList, getCaseTypeList, getCaseTypeDetailList, getCaseTypeTimes } from '@/api/coorBusiness/case'
import { getCommonLanguage, getFilingTypeList, getCaseLevelList, getEorc } from '@/api/coorBusiness/dict'
+import { getUserReplyList } from '@/api/userReply/userReply'
import { historicalRecords, nextNodes, completeCaseTask } from '@/api/coorBusiness/process'
import LeafletMapRead from '@/components/Map/leafletMapRead'
import { radioMap } from './radioMap'
@@ -517,8 +522,15 @@
}
// 查询常用语列表
- const languageRes = await getCommonLanguage()
- this.commonLanguageList = languageRes.data
+ const languageRes = await getUserReplyList()
+
+ if (languageRes.data) {
+ const options = languageRes.data.filter(option => option.type === '2')
+ if (options.length > 0) {
+ this.commonLanguageList.push({ label: '个人常用语', options: options })
+ }
+ this.commonLanguageList.push({ label: '固定常用语', options: languageRes.data.filter(option => option.type === '1') })
+ }
// 查询流转记录接口
this.processForm.processId = this.caseDetail.processId
@@ -894,7 +906,7 @@
}
this.processForm.dispatchDeptId = this.processCompObj.dispatchDeptId
} else if (radioConfig.passBack === 'onedeptid') {
- if(this.caseDetail.onedeptid) {
+ if (this.caseDetail.onedeptid) {
this.processForm.dispatchDeptId = this.caseDetail.onedeptid
}
}
diff --git a/src/main.js b/src/main.js
index cac8a4c..23041fc 100644
--- a/src/main.js
+++ b/src/main.js
@@ -26,13 +26,14 @@
import 'babel-polyfill'
// import '../mock' // simulation data
-import { hasPermission, showWellType, showDeviceType, showIpConfig, isOperation } from './utils/permission'
+import { hasPermission, showWellType, showDeviceType, showIpConfig, isOperation, isAdmin } from './utils/permission'
Vue.prototype.hasPerm = hasPermission
Vue.prototype.showWellType = showWellType
Vue.prototype.showDeviceType = showDeviceType
Vue.prototype.showIpConfig = showIpConfig
Vue.prototype.isOperation = isOperation
+Vue.prototype.isAdmin = isAdmin
// 引入Element-ui
Vue.use(ElementUI, { locale })
diff --git a/src/router/modules/system.js b/src/router/modules/system.js
index 134cb1e..59b57d7 100644
--- a/src/router/modules/system.js
+++ b/src/router/modules/system.js
@@ -54,6 +54,12 @@
component: () => import('@/views/busAdmin/areaPersonliable/areaPersonliable'),
name: 'AreaPersonliable',
meta: { title: '网格责任人管理', icon: '', permission: ['/areaPersonliable'] }
+ },
+ {
+ path: '/userReply',
+ component: () => import('@/views/busAdmin/userReply/userReplyList'),
+ name: 'userReply',
+ meta: { title: '常用语设置', icon: '', permission: ['/userReply'] }
}
]
},
diff --git a/src/utils/permission.js b/src/utils/permission.js
index f5e6c09..4ac94c9 100644
--- a/src/utils/permission.js
+++ b/src/utils/permission.js
@@ -42,3 +42,9 @@
return (tip === 'operation' || tip === 'administrator')
})
}
+export function isAdmin() {
+ const roleTips = store.getters.roleTips
+ return roleTips.some(tip => { // 遍历btns,查找btn.url是否有匹配的permission,有则返回true,否则返回false
+ return (tip === 'administrator')
+ })
+}
diff --git a/src/views/busAdmin/userReply/editUserReply.vue b/src/views/busAdmin/userReply/editUserReply.vue
new file mode 100644
index 0000000..2a586fb
--- /dev/null
+++ b/src/views/busAdmin/userReply/editUserReply.vue
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/busAdmin/userReply/userReplyList.vue b/src/views/busAdmin/userReply/userReplyList.vue
new file mode 100644
index 0000000..0033060
--- /dev/null
+++ b/src/views/busAdmin/userReply/userReplyList.vue
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+