通讯组新增通讯类型

liujun0703-新项目开发
liujun 2024-08-19 14:30:10 +08:00
parent 43f19b5b4d
commit 18aa3452ad
3 changed files with 84 additions and 37 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="filter-container"> <div class="filter-container">
<el-input v-model="KEYWORDS" placeholder="搜索" class="filter-item" style="width: 200px;" /> <el-input v-model="KEYWORDS" placeholder="搜索" class="filter-item" style="width: 200px;"/>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getQuery"> <el-button class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索 搜索
</el-button> </el-button>
@ -17,17 +17,18 @@
fit fit
highlight-current-row highlight-current-row
row-key="id" row-key="id"
> >
<el-table-column label="组名称" prop="GROUP_NAME"/>
<el-table-column label="组名称" prop="GROUP_NAME" /> <el-table-column label="组类型" prop="GROUP_TYPE_NAME"/>
<el-table-column label="操作" align="center" width="350">
<el-table-column label="操作" align="center" width="800">
<template v-slot="{row}"> <template v-slot="{row}">
<el-button type="primary" icon="el-icon-thumb" @click="addAdressMember(row.ID)"></el-button> <el-button type="text" icon="el-icon-thumb" @click="addAdressMember(row.ID)"></el-button>
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)"></el-button> <el-button type="text" icon="el-icon-edit" size="mini" @click="handleEdit(row)"></el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID,row.GROUP_NAME)"></el-button> <el-button type="text" style="color: red" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID,row.GROUP_NAME)">
<el-button type="info" icon="el-icon-folder-add" size="mini" @click="addLowerLevel(row.ID,row.GROUP_NAME)"></el-button> </el-button>
<el-button type="text" icon="el-icon-folder-add" size="mini" @click="addLowerLevel(row.ID,row.GROUP_NAME)">
添加下级通讯组
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -37,16 +38,22 @@
<el-button type="primary" icon="el-icon-plus" @click="handleAdd"></el-button> <el-button type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>
</template> </template>
</div> </div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
</div> </div>
<el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改':'新增'" width="600px"> <el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改':'新增'" width="600px">
<el-tag class="mark_up" size="medium">上级菜单{{ proid == '0' ?'(无) 此项为顶级分组':groupname }}</el-tag>
<el-form ref="form" :rules="rules" :model="form" label-width="110px" style="width: 500px;"> <el-form ref="form" :rules="rules" :model="form" label-width="110px" style="width: 500px;">
<el-form-item>
<el-tag class="mark_up" size="medium">上级菜单{{ proid == '0' ? '(无) 此项为顶级分组' : groupname }}</el-tag>
</el-form-item>
<el-form-item label="组名称" prop="GROUP_NAME"> <el-form-item label="组名称" prop="GROUP_NAME">
<el-input v-model="form.GROUP_NAME" placeholder="这里输入标题..." /> <el-input v-model="form.GROUP_NAME" placeholder="请输入..."/>
</el-form-item>
</el-form-item></el-form> <el-form-item label="组类型" prop="GROUP_TYPE">
<el-select v-model="form.GROUP_TYPE" placeholder="请选择" style="width: 100%;">
<el-option v-for="item in groupTypeList" :key="item.DICTIONARIES_ID" :label="item.name" :value="item.DICTIONARIES_ID"/>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormEdit = false"> </el-button> <el-button @click="dialogFormEdit = false"> </el-button>
<el-button type="primary" @click="confirm"> </el-button> <el-button type="primary" @click="confirm"> </el-button>
@ -62,6 +69,7 @@ import { requestFN } from '@/utils/request'
import { Treeselect } from '@riophae/vue-treeselect' import { Treeselect } from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css' import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default { export default {
components: { Treeselect, Pagination }, components: { Treeselect, Pagination },
data() { data() {
@ -78,21 +86,27 @@ export default {
dialogType: 'add', dialogType: 'add',
form: { form: {
GROUP_NAME: '', GROUP_NAME: '',
PRO_ID: '0' PRO_ID: '0',
GROUP_TYPE: '',
GROUP_TYPE_NAME: ''
}, },
rules: { rules: {
GROUP_NAME: [ GROUP_NAME: [
{ required: true, message: '组名称不能为空', trigger: 'blur' }, { required: true, message: '组名称不能为空', trigger: 'blur' },
{ min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur' }] { min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur' }],
GROUP_TYPE: [
{ required: true, message: '组类型不能为空', trigger: 'blur' }
]
}, },
treeData: [], treeData: [],
proid: '0', proid: '0',
groupname: '' groupname: '',
groupTypeList: []
} }
}, },
created() { created() {
this.getList() this.getList()
this.getDic()
}, },
methods: { methods: {
@ -125,10 +139,11 @@ export default {
handleEdit(v) { handleEdit(v) {
this.dialogFormEdit = true this.dialogFormEdit = true
this.form = { this.form = {
TITLE: v.TITLE, GROUP_NAME: v.GROUP_NAME,
CONTENT: v.CONTENT, PRO_ID: v.PRO_ID,
LEVEL: v.LEVEL, ID: v.ID,
ID: v.ID GROUP_TYPE: v.GROUP_TYPE,
GROUP_TYPE_NAME: v.GROUP_TYPE_NAME
} }
this.dialogType = 'editUser' this.dialogType = 'editUser'
this.$refs.upload.clearFiles() this.$refs.upload.clearFiles()
@ -165,6 +180,7 @@ export default {
dataSave() { dataSave() {
this.listLoading = true this.listLoading = true
this.form.PRO_ID = this.proid this.form.PRO_ID = this.proid
this.form.GROUP_TYPE_NAME = this.groupTypeList.find((item) => item.DICTIONARIES_ID === this.form.GROUP_TYPE).name
requestFN( requestFN(
'/yjcommunicate/saveGroup', this.form '/yjcommunicate/saveGroup', this.form
).then((data) => { ).then((data) => {
@ -172,6 +188,12 @@ export default {
this.dialogFormEdit = false this.dialogFormEdit = false
this.varList = [] this.varList = []
this.listQuery.page = 1 this.listQuery.page = 1
this.form = {
GROUP_NAME: '',
PRO_ID: '0',
GROUP_TYPE: '',
GROUP_TYPE_NAME: ''
}
this.getList() this.getList()
}).catch((e) => { }).catch((e) => {
this.listLoading = false this.listLoading = false
@ -242,6 +264,14 @@ export default {
getQuery() { getQuery() {
this.$refs.multipleTable.clearSelection() this.$refs.multipleTable.clearSelection()
this.getList() this.getList()
},
getDic() {
requestFN('/dictionaries/listTree', { PARENT_ID: '92f2bdab1c6140618784930d1ab183af' })
.then((data) => {
this.groupTypeList = JSON.parse(data.zTreeNodes)
}).catch((e) => {
console.log(e)
})
} }
} }

View File

@ -1,10 +1,19 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="filter-container"> <div class="filter-container">
<el-input v-model="KEYWORDS" placeholder="搜索" class="filter-item" style="width: 200px;" /> <el-row>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getQuery"> <el-form ref="form" label-width="100px">
搜索 <el-col :span="6">
</el-button> <el-form-item label="名称:" prop="KEYWORDS">
<el-input v-model="KEYWORDS" placeholder="搜索" class="filter-item" style="width: 300px;" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getQuery"></el-button>
<el-button class="filter-item" type="info" icon="el-icon-refresh" @click="resetQuery"></el-button>
</el-col>
</el-form>
</el-row>
</div> </div>
<el-table ref="multipleTable" :data="varList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" tooltip-effect="dark" border fit highlight-current-row> <el-table ref="multipleTable" :data="varList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" tooltip-effect="dark" border fit highlight-current-row>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
@ -672,6 +681,10 @@ export default {
getQuery() { getQuery() {
this.$refs.multipleTable.clearSelection() this.$refs.multipleTable.clearSelection()
this.getList() this.getList()
},
resetQuery() {
this.KEYWORDS = ''
this.getQuery()
} }
} }

View File

@ -1,15 +1,19 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="filter-container"> <div class="filter-container">
<el-form inline> <el-row>
<el-form label-width="100px">
<el-col :span="6">
<el-form-item label="机构名称:" prop="RESCUE_TEAM_NAME"> <el-form-item label="机构名称:" prop="RESCUE_TEAM_NAME">
<el-input v-model="RESCUE_TEAM_NAME" placeholder="机构名称" class="filter-item" style="width: 200px;"/> <el-input v-model="RESCUE_TEAM_NAME" placeholder="机构名称" class="filter-item" style="width: 300px"/>
</el-form-item> </el-form-item>
<el-form-item> </el-col>
<el-col :span="6">
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getQuery"></el-button> <el-button class="filter-item" type="primary" icon="el-icon-search" @click="getQuery"></el-button>
<el-button class="filter-item" type="info" icon="el-icon-refresh" @click="resetQuery"></el-button> <el-button class="filter-item" type="info" icon="el-icon-refresh" @click="resetQuery"></el-button>
</el-form-item> </el-col>
</el-form> </el-form>
</el-row>
</div> </div>
<el-table <el-table
ref="multipleTable" ref="multipleTable"