liujun0708-动火作业流程图逻辑修改
			
			
		
		
							parent
							
								
									7d6a7ca474
								
							
						
					
					
						commit
						75792f9fb1
					
				|  | @ -0,0 +1,272 @@ | |||
| <template> | ||||
|   <div class="app-container"> | ||||
| 
 | ||||
|     <div class="filter-container" style="    display: flex;justify-content: space-between;"> | ||||
|       <div> | ||||
|         <el-tag>通讯录成员</el-tag> | ||||
| 
 | ||||
|       </div> | ||||
| 
 | ||||
|       <div > | ||||
|         <el-button type="primary" @click="goBack">返回通讯组</el-button> | ||||
|       </div> | ||||
|     </div> | ||||
|     <el-form label-width="100px"> | ||||
|       <el-row> | ||||
|         <el-col :span="6"> | ||||
|           <el-form-item label="姓名"> | ||||
|             <el-input v-model="addressName" placeholder="搜索姓名"/> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
| 
 | ||||
|         <el-col :span="6"> | ||||
|           <el-form-item label="性别"> | ||||
|             <el-radio v-model="addressSex" label="0">男</el-radio> | ||||
|             <el-radio v-model="addressSex" label="1">女</el-radio> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|         <el-col :span="6"> | ||||
|           <el-form-item label-width="10px"> | ||||
|             <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery"> | ||||
|               搜索 | ||||
|             </el-button> | ||||
|             <el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset"> | ||||
|               重置 | ||||
|             </el-button> | ||||
|           </el-form-item> | ||||
|         </el-col> | ||||
|       </el-row> | ||||
|     </el-form> | ||||
|     <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="index" label="序号" width="50" align="center" /> | ||||
|       <el-table-column prop="NAME" label="姓名" /> | ||||
|       <el-table-column prop="SEX" width="180" align="center" label="性别" > | ||||
|         <template v-slot="{row}"> | ||||
|           <span>{{ row.SEX==='0'?'男':'女' }}</span> | ||||
|         </template> | ||||
| 
 | ||||
|       </el-table-column> | ||||
|       <el-table-column prop="OFFICE_PHONE" label="移动电话" /> | ||||
|       <el-table-column prop="MOVE_PHONE" label="办公电话" /> | ||||
|       <el-table-column label="操作" align="center" width="300"> | ||||
|         <template v-slot="{row}"> | ||||
|           <el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)">编辑</el-button> | ||||
|           <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.ADDRESS_ID,row.NAME)">删除</el-button> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|     </el-table> | ||||
|     <div class="page-btn-group"> | ||||
|       <div> | ||||
|         <template> | ||||
|           <el-button type="primary" icon="el-icon-plus" @click="handleAdd">添加</el-button> | ||||
|           <!--          <el-button type="danger" icon="el-icon-delete" plain @click="makeAll('0')">删除</el-button>--> | ||||
|         </template> | ||||
|       </div> | ||||
|       <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> | ||||
|     </div> | ||||
|     <el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改通讯录成员':'新增通讯录成员'" width="600px"> | ||||
|       <el-form ref="form" :rules="rules" :model="form" label-width="110px" style="width: 500px;"> | ||||
| 
 | ||||
|         <el-form-item label="内容" prop="CONTENT"> | ||||
|           <el-input | ||||
|             v-model="form.NAME" | ||||
|             :rows="10" | ||||
| 
 | ||||
|             placeholder="请输入姓名"/> | ||||
|         </el-form-item> | ||||
| 
 | ||||
|         <el-form-item label="性别" prop="form.SEX"> | ||||
|           <el-radio v-model="form.SEX" label="0">男</el-radio> | ||||
|           <el-radio v-model="form.SEX" label="1">女</el-radio> | ||||
|         </el-form-item> | ||||
| 
 | ||||
|         <el-form-item label="办公电话" prop="OFFICE_PHONE"> | ||||
|           <el-input | ||||
|             v-model="form.OFFICE_PHONE" | ||||
|             :rows="10" | ||||
| 
 | ||||
|             placeholder="请输入办公电话"/> | ||||
|         </el-form-item> | ||||
| 
 | ||||
|         <el-form-item label="移动电话" prop="MOVE_PHONE"> | ||||
|           <el-input | ||||
|             v-model="form.MOVE_PHONE" | ||||
|             :rows="10" | ||||
| 
 | ||||
|             placeholder="请输入移动电话"/> | ||||
|         </el-form-item> | ||||
| 
 | ||||
|       </el-form> | ||||
|       <div slot="footer" class="dialog-footer"> | ||||
|         <el-button @click="dialogFormEdit = false">取 消</el-button> | ||||
|         <el-button type="primary" @click="confirm">确 定</el-button> | ||||
|       </div> | ||||
|     </el-dialog> | ||||
| 
 | ||||
|   </div> | ||||
| </template> | ||||
| 
 | ||||
| <script> | ||||
| import Pagination from '@/components/Pagination' | ||||
| import { requestFN } from '@/utils/request' | ||||
| 
 | ||||
| export default { | ||||
|   components: { Pagination }, | ||||
|   data() { | ||||
|     return { | ||||
|       listQuery: { | ||||
|         page: 1, | ||||
|         limit: 10 | ||||
|       }, | ||||
|       total: 0, | ||||
|       varList: [], | ||||
|       KEYWORDS: '', | ||||
|       dialogFormEdit: false, | ||||
|       dialogFormShow: false, | ||||
|       dialogType: 'add', | ||||
|       form: { | ||||
|         NAME: '', | ||||
|         SEX: '0', | ||||
|         OFFICE_PHONE: '', | ||||
|         MOVE_PHONE: '' | ||||
|       }, | ||||
|       rules: { | ||||
|         OFFICE_PHONE: [ | ||||
|           { required: true, message: '办公电话不能为空', trigger: 'blur' }, | ||||
|           { min: 11, max: 11, message: '请输入11位手机号码', trigger: 'blur' }, | ||||
|           { | ||||
|             pattern: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/, | ||||
|             message: '请输入正确的手机号码' | ||||
|           } | ||||
|         ], | ||||
|         MOVE_PHONE: [ | ||||
|           { required: true, message: '移动电话不能为空', trigger: 'blur' }, | ||||
|           { min: 11, max: 11, message: '请输入11位手机号码', trigger: 'blur' }, | ||||
|           { | ||||
|             pattern: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/, | ||||
|             message: '请输入正确的手机号码' | ||||
|           } | ||||
|         ], | ||||
|         NAME: [ | ||||
|           { required: true, message: '类型不能为空', trigger: 'blur' }, | ||||
|           { min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur' }] | ||||
| 
 | ||||
|       }, | ||||
|       GROUP_ID: '', | ||||
|       addressName: '', | ||||
|       addressSex: '' | ||||
|     } | ||||
|   }, | ||||
| 
 | ||||
|   created() { | ||||
|     if (this.$parent.CASE_ID) { | ||||
|       this.GROUP_ID = this.$parent.CASE_ID | ||||
|     } | ||||
|     this.getList() | ||||
|   }, | ||||
|   methods: { | ||||
|     goBack() { | ||||
|       this.$parent.activeName = 'grouplist' | ||||
|     }, | ||||
|     goKeyReset() { | ||||
|       this.addressName = '' | ||||
|       this.addressSex = '' | ||||
|       this.getQuery() | ||||
|     }, | ||||
|     //* *******************列表查询****************************** | ||||
| 
 | ||||
|     getList() { | ||||
|       this.listLoading = true | ||||
|       requestFN( | ||||
|         '/yjcommunicate/listAddressBook?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, | ||||
|         { | ||||
|           groupId: this.GROUP_ID, | ||||
|           addressName: this.addressName, | ||||
|           addressSex: this.addressSex | ||||
|         } | ||||
|       ).then((data) => { | ||||
|         this.listLoading = false | ||||
|         this.varList = data.varList | ||||
|         this.total = data.page.totalResult | ||||
|       }) | ||||
|         .catch((e) => { | ||||
|           this.listLoading = false | ||||
|         }) | ||||
|     }, | ||||
| 
 | ||||
|     //* ***************************数据保存********************************** | ||||
|     handleEdit(v) { | ||||
|       this.dialogFormEdit = true | ||||
|       this.form = { | ||||
|         NAME: v.NAME, | ||||
|         ADDRESS_ID: v.ADDRESS_ID, | ||||
|         SEX: v.SEX, | ||||
|         OFFICE_PHONE: v.OFFICE_PHONE, | ||||
|         MOVE_PHONE: v.MOVE_PHONE | ||||
|       } | ||||
|       this.dialogType = 'editUser' | ||||
|     }, | ||||
|     handleAdd() { | ||||
|       this.dialogFormEdit = true | ||||
|       this.form = { SEX: '0' } | ||||
|       this.dialogType = 'saveUser' | ||||
|     }, | ||||
|     confirm() { | ||||
|       this.form.GROUP_ID = this.GROUP_ID | ||||
|       this.$refs.form.validate(valid => { | ||||
|         if (valid) { | ||||
|           this.dataSave() | ||||
|         } else { | ||||
|           return false | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     dataSave() { | ||||
|       this.listLoading = true | ||||
|       requestFN( | ||||
|         '/yjcommunicate/saveAddressBook', this.form | ||||
|       ).then((data) => { | ||||
|         this.listLoading = false | ||||
|         this.dialogFormEdit = false | ||||
|         this.varList = [] | ||||
|         this.listQuery.page = 1 | ||||
|         this.getList() | ||||
|       }).catch((e) => { | ||||
|         this.listLoading = false | ||||
|       }) | ||||
|     }, | ||||
|     //* *****************************删除******************************** | ||||
|     handleDelete(id, name) { | ||||
|       this.$confirm('确定要删除[' + name + ']吗?', { | ||||
|         confirmButtonText: '确定', | ||||
|         cancelButtonText: '取消', | ||||
|         type: 'warning' | ||||
|       }).then(() => { | ||||
|         this.listLoading = true | ||||
|         requestFN( | ||||
|           '/yjcommunicate/deleteAddressBook', | ||||
|           { | ||||
|             id: id | ||||
|           } | ||||
|         ).then((data) => { | ||||
|           if (data.result == 'success') { | ||||
|             this.listLoading = false | ||||
|             this.getList() | ||||
|           } | ||||
|         }).catch((e) => { | ||||
|           this.listLoading = false | ||||
|         }) | ||||
|       }).catch(() => { | ||||
|       }) | ||||
|     }, | ||||
| 
 | ||||
|     getQuery() { | ||||
|       this.$refs.multipleTable.clearSelection() | ||||
|       this.getList() | ||||
|     } | ||||
| 
 | ||||
|   } | ||||
| } | ||||
| </script> | ||||
| 
 | ||||
|  | @ -0,0 +1,250 @@ | |||
| <template> | ||||
|   <div class="app-container"> | ||||
|     <div class="filter-container"> | ||||
|       <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> | ||||
|     </div> | ||||
| 
 | ||||
|     <el-table | ||||
|       ref="multipleTable" | ||||
|       :data="varList" | ||||
|       :header-cell-style="{'font-weight': 'bold','color': '#000'}" | ||||
|       :tree-props="{children: 'children', hasChildren: 'hasChildren'}" | ||||
|       tooltip-effect="dark" | ||||
|       border | ||||
|       fit | ||||
|       highlight-current-row | ||||
|       row-key="id" | ||||
| 
 | ||||
|     > | ||||
| 
 | ||||
|       <el-table-column label="组名称" prop="GROUP_NAME" /> | ||||
| 
 | ||||
|       <el-table-column label="操作" align="center" width="800"> | ||||
|         <template v-slot="{row}"> | ||||
|           <el-button type="primary" 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="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID,row.GROUP_NAME)">删除</el-button> | ||||
|           <el-button type="info" icon="el-icon-folder-add" size="mini" @click="addLowerLevel(row.ID,row.GROUP_NAME)">添加下级通讯组</el-button> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|     </el-table> | ||||
|     <div class="page-btn-group"> | ||||
|       <div> | ||||
|         <template> | ||||
|           <el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button> | ||||
|         </template> | ||||
|       </div> | ||||
|       <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> | ||||
|     </div> | ||||
|     <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-item label="组名称" prop="GROUP_NAME"> | ||||
|           <el-input v-model="form.GROUP_NAME" placeholder="这里输入标题..." /> | ||||
| 
 | ||||
|       </el-form-item></el-form> | ||||
|       <div slot="footer" class="dialog-footer"> | ||||
|         <el-button @click="dialogFormEdit = false">取 消</el-button> | ||||
|         <el-button type="primary" @click="confirm">确 定</el-button> | ||||
|       </div> | ||||
|     </el-dialog> | ||||
| 
 | ||||
|   </div> | ||||
| </template> | ||||
| 
 | ||||
| <script> | ||||
| import Pagination from '@/components/Pagination' | ||||
| import { requestFN } from '@/utils/request' | ||||
| 
 | ||||
| import { Treeselect } from '@riophae/vue-treeselect' | ||||
| import '@riophae/vue-treeselect/dist/vue-treeselect.css' | ||||
| export default { | ||||
|   components: { Treeselect, Pagination }, | ||||
|   data() { | ||||
|     return { | ||||
|       listQuery: { | ||||
|         page: 1, | ||||
|         limit: 10 | ||||
|       }, | ||||
|       total: 0, | ||||
|       varList: [], | ||||
|       KEYWORDS: '', | ||||
|       dialogFormEdit: false, | ||||
|       dialogFormShow: false, | ||||
|       dialogType: 'add', | ||||
|       form: { | ||||
|         GROUP_NAME: '', | ||||
|         PRO_ID: '0' | ||||
|       }, | ||||
|       rules: { | ||||
|         GROUP_NAME: [ | ||||
|           { required: true, message: '组名称不能为空', trigger: 'blur' }, | ||||
|           { min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur' }] | ||||
| 
 | ||||
|       }, | ||||
|       treeData: [], | ||||
|       proid: '0', | ||||
|       groupname: '' | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.getList() | ||||
|   }, | ||||
|   methods: { | ||||
| 
 | ||||
|     // 跳转 | ||||
|     goList(page, CASE_ID, ticketType) { | ||||
|       this.$parent.activeName = page | ||||
|       this.$parent.CASE_ID = CASE_ID | ||||
|       this.$parent.ticketType = ticketType | ||||
|     }, | ||||
|     //* *******************列表查询****************************** | ||||
| 
 | ||||
|     getList() { | ||||
|       this.listLoading = true | ||||
|       requestFN( | ||||
|         '/yjcommunicate/Grouplist?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, | ||||
|         { | ||||
|           name: this.KEYWORDS | ||||
|         } | ||||
|       ).then((data) => { | ||||
|         this.listLoading = false | ||||
|         this.varList = data.varList | ||||
|         this.total = data.page.totalResult | ||||
|       }) | ||||
|         .catch((e) => { | ||||
|           this.listLoading = false | ||||
|         }) | ||||
|     }, | ||||
| 
 | ||||
|     //* ***************************数据保存********************************** | ||||
|     handleEdit(v) { | ||||
|       this.dialogFormEdit = true | ||||
|       this.form = { | ||||
|         TITLE: v.TITLE, | ||||
|         CONTENT: v.CONTENT, | ||||
|         LEVEL: v.LEVEL, | ||||
|         ID: v.ID | ||||
|       } | ||||
|       this.dialogType = 'editUser' | ||||
|       this.$refs.upload.clearFiles() | ||||
|     }, | ||||
|     handleAdd() { | ||||
|       this.proid = '0' | ||||
|       this.dialogFormEdit = true | ||||
|       this.form = {} | ||||
|       this.dialogType = 'saveUser' | ||||
|       this.$refs.upload.clearFiles() | ||||
|     }, | ||||
|     // 添加通讯租成员 | ||||
|     addAdressMember(id, name) { | ||||
|       this.$parent.activeName = 'addressbook' | ||||
|       this.$parent.CASE_ID = id | ||||
|     }, | ||||
|     // 添加下级分组 | ||||
|     addLowerLevel(id, name) { | ||||
|       this.proid = id | ||||
|       this.groupname = name | ||||
|       this.dialogFormEdit = true | ||||
|       this.form = {} | ||||
|       this.dialogType = 'saveUser' | ||||
|     }, | ||||
|     confirm() { | ||||
|       this.$refs.form.validate(valid => { | ||||
|         if (valid) { | ||||
|           this.dataSave() | ||||
|         } else { | ||||
|           return false | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     dataSave() { | ||||
|       this.listLoading = true | ||||
|       this.form.PRO_ID = this.proid | ||||
|       requestFN( | ||||
|         '/yjcommunicate/saveGroup', this.form | ||||
|       ).then((data) => { | ||||
|         this.listLoading = false | ||||
|         this.dialogFormEdit = false | ||||
|         this.varList = [] | ||||
|         this.listQuery.page = 1 | ||||
|         this.getList() | ||||
|       }).catch((e) => { | ||||
|         this.listLoading = false | ||||
|       }) | ||||
|     }, | ||||
|     //* *****************************删除******************************** | ||||
|     handleDelete(id, name) { | ||||
|       this.$confirm('确定要删除[' + name + ']吗?', { | ||||
|         confirmButtonText: '确定', | ||||
|         cancelButtonText: '取消', | ||||
|         type: 'warning' | ||||
|       }).then(() => { | ||||
|         this.listLoading = true | ||||
|         requestFN( | ||||
|           '/yjcommunicate/deleteGroup', | ||||
|           { | ||||
|             id: id | ||||
|           } | ||||
|         ).then((data) => { | ||||
|           if (data.result == 'success') { | ||||
|             this.listLoading = false | ||||
|             this.getList() | ||||
|           } | ||||
|         }).catch((e) => { | ||||
|           this.listLoading = false | ||||
|         }) | ||||
|       }).catch(() => { | ||||
|       }) | ||||
|     }, | ||||
|     makeAll() { | ||||
|       const _selectData = this.$refs.multipleTable.selection | ||||
|       console.info('_selectData') | ||||
|       console.info(_selectData) | ||||
|       if (_selectData == null || _selectData.length == 0) { | ||||
|         this.$message({ | ||||
|           message: '请选中要删除的项...', | ||||
|           type: 'error' | ||||
|         }) | ||||
|         return false | ||||
|       } | ||||
|       const ids = _selectData.map((item, index) => { | ||||
|         return item.ID | ||||
|       }).join(',') | ||||
| 
 | ||||
|       this.$confirm('确定要删除选中的数据吗?', { | ||||
|         confirmButtonText: '确定', | ||||
|         cancelButtonText: '取消', | ||||
|         type: 'warning' | ||||
|       }).then(() => { | ||||
|         this.listLoading = true | ||||
|         requestFN( | ||||
|           '/yjcommunicate/deleteAll', | ||||
|           { | ||||
|             ids: ids | ||||
|           } | ||||
|         ).then(() => { | ||||
|           this.listLoading = false | ||||
|           this.varList = [] | ||||
|           this.listQuery.page = 1 | ||||
|           this.$refs.multipleTable.clearSelection() | ||||
|           this.getList() | ||||
|         }).catch((e) => { | ||||
|           this.listLoading = false | ||||
|         }) | ||||
|       }).catch(() => { | ||||
|       }) | ||||
|     }, | ||||
|     getQuery() { | ||||
|       this.$refs.multipleTable.clearSelection() | ||||
|       this.getList() | ||||
|     } | ||||
| 
 | ||||
|   } | ||||
| } | ||||
| </script> | ||||
| 
 | ||||
|  | @ -0,0 +1,19 @@ | |||
| <template> | ||||
|   <div> | ||||
|     <grouplist v-show="activeName=='grouplist'" ref="list" /> | ||||
|     <addressbook v-if="activeName=='addressbook'"/> | ||||
|   </div> | ||||
| </template> | ||||
| <script> | ||||
| import grouplist from './components/grouplist.vue' | ||||
| import addressbook from './components/addressbook.vue' | ||||
| export default { | ||||
|   components: { grouplist, addressbook }, | ||||
|   data() { | ||||
|     return { | ||||
|       activeName: 'grouplist', | ||||
|       CASE_ID: '' | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </script> | ||||
		Loading…
	
		Reference in New Issue