Merge branch 'build' of http://git.sinoecare.com/sinoecare/digital_village_v2/dvcp_v2_webapp into build
This commit is contained in:
		| @@ -5,6 +5,15 @@ let components = []; | ||||
| // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册 | ||||
| const install = function (Vue) { | ||||
|   if (install.installed) return; | ||||
|   // 声明全局业务对象类 | ||||
|   const models = require.context('./model', true, /\.js$/) | ||||
|   if (models) { | ||||
|     const model = {} | ||||
|     models.keys().map(e => { | ||||
|       model[e.replace(/\.[\/\\]([^\\\/]+)\.js$/, '$1')] = models(e).default | ||||
|     }) | ||||
|     Vue.prototype.MODEL = model | ||||
|   } | ||||
|   // 遍历注册全局组件 | ||||
|   let contexts = require.context('.', true, /[\\\/]Ai([^\\\/]+)\.vue$/); | ||||
|   if (contexts) { | ||||
|   | ||||
							
								
								
									
										0
									
								
								components/model/Party.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								components/model/Party.js
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										26
									
								
								components/model/PartyOrg.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								components/model/PartyOrg.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| import http from "dvcp-ui/lib/js/request"; | ||||
| import Vue from "vue" | ||||
|  | ||||
| export default class PartyOrg { | ||||
|   constructor(id) { | ||||
|     this.id = id | ||||
|     this.loaded = false | ||||
|     this.init().finally(() => this.loaded = true) | ||||
|   } | ||||
|  | ||||
|   init() { | ||||
|     return PartyOrg.getInfo(this.id).then(data => { | ||||
|       Object.entries(data).map(([k, v]) => Vue.set(this, k, v)) | ||||
|     }) | ||||
|   } | ||||
|  | ||||
|   static getInfo(id) { | ||||
|     return http.post("/app/partyOrganization/queryOrgById", null, { | ||||
|       params: {id} | ||||
|     }).then(res => { | ||||
|       if (res?.data) { | ||||
|         return res.data | ||||
|       } | ||||
|     }) | ||||
|   } | ||||
| } | ||||
| @@ -9,11 +9,13 @@ | ||||
|         <template #content> | ||||
|           <ai-wrapper | ||||
|             label-width="120px"> | ||||
|             <ai-info-item label="任务名称" :value="info.name"></ai-info-item> | ||||
|             <ai-info-item label="任务名称" :value="info.title"></ai-info-item> | ||||
|             <ai-info-item label="创建时间" :value="info.createTime"></ai-info-item> | ||||
|             <ai-info-item label="更新时间" :value="info.idNumber"></ai-info-item> | ||||
|             <ai-info-item label="创建人" :value="info.phone"></ai-info-item> | ||||
|             <ai-info-item label="任务完成度" :value="dict.getLabel('EP_registerPersonType', info.type)"></ai-info-item> | ||||
|             <ai-info-item label="更新时间" :value="info.updateTime"></ai-info-item> | ||||
|             <ai-info-item label="创建人" :value="info.createUserName"></ai-info-item> | ||||
|             <ai-info-item label="任务完成度" :value="dict.getLabel('tastStatus', info.status)"> | ||||
|               <span :style="{color: dict.getColor('tastStatus', info.status)}">{{ dict.getLabel('tastStatus', info.status) }}</span> | ||||
|             </ai-info-item> | ||||
|           </ai-wrapper> | ||||
|         </template> | ||||
|       </ai-card> | ||||
| @@ -24,24 +26,23 @@ | ||||
|               <el-button type="primary" @click="isShow = true">添加表单</el-button> | ||||
|             </template> | ||||
|             <template #right> | ||||
|               <el-input | ||||
|                 v-model="search.name" | ||||
|                 size="small" | ||||
|                 placeholder="请输入参评人姓名" | ||||
|                 clearable | ||||
|                 v-throttle="() => {search.current = 1, getList()}" | ||||
|                 @clear="search.current = 1, search.name = '', getList()" | ||||
|                 suffix-icon="iconfont iconSearch"> | ||||
|               </el-input> | ||||
|             </template> | ||||
|           </ai-search-bar> | ||||
|           <ai-table | ||||
|             :isShowPagination="false" | ||||
|             tableSize="small" | ||||
|             border | ||||
|             :tableData="info.riskDisposalList" | ||||
|             :tableData="info.templateList" | ||||
|             :col-configs="colConfigs" | ||||
|             @getList="() => {}"> | ||||
|             <el-table-column slot="options" width="140px" fixed="right" label="操作" align="center"> | ||||
|               <template slot-scope="{ row }"> | ||||
|                 <div class="table-options"> | ||||
|                   <el-button type="text" @click="toDetail(row.id)">详情</el-button> | ||||
|                   <el-button type="text" v-if="row.status === '1'" @click="changeStatus(row.id)">停止</el-button> | ||||
|                 </div> | ||||
|               </template> | ||||
|             </el-table-column> | ||||
|           </ai-table> | ||||
|         </template> | ||||
|       </ai-card> | ||||
| @@ -51,46 +52,48 @@ | ||||
|         title="添加表单" | ||||
|         @onConfirm="onConfirm"> | ||||
|         <el-form ref="form" class="ai-form" :model="form" label-width="110px" label-position="right"> | ||||
|           <el-form-item label="选择模板" style="width: 100%" prop="type" :rules="[{required: true, message: '请选择模板', trigger: 'blur'}]"> | ||||
|           <el-form-item label="选择模板" style="width: 100%" prop="templateId" :rules="[{required: true, message: '请选择模板', trigger: 'change'}]"> | ||||
|             <ai-select | ||||
|               v-model="form.type" | ||||
|               v-model="form.templateId" | ||||
|               clearable | ||||
|               :selectList="list" | ||||
|               placeholder="请选择模板"> | ||||
|             </ai-select> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="表单名称" style="width: 100%" prop="name" :rules="[{required: true, message: '请输入任务名称', trigger: 'blur'}]"> | ||||
|             <el-input v-model="form.name" size="small" placeholder="请输入任务名称"></el-input> | ||||
|           <el-form-item label="表单名称" style="width: 100%" prop="templateName" :rules="[{required: true, message: '请输入任务名称', trigger: 'blur'}]"> | ||||
|             <el-input v-model="form.templateName" size="small" placeholder="请输入任务名称"></el-input> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="参评人员" style="width: 100%" prop="examinesName1" :rules="[{required: true, message: '请选择参评人员', trigger: 'change'}]"> | ||||
|             <ai-user-selecter :instance="instance" v-model="form.examines" @change="e => onUserChange(e, 'examinesName1')"> | ||||
|           <el-form-item label="参评人员" style="width: 100%" prop="evaluatorsNames" :rules="[{required: true, message: '请选择参评人员', trigger: 'change'}]"> | ||||
|             <ai-user-selecter :instance="instance" v-model="form.evaluatorsList" @change="e => onUserChange(e, 'evaluatorsNames')"> | ||||
|               <div class="AppAnnounceDetail-select"> | ||||
|                 <el-input class="AppAnnounceDetail-select__input" size="small" placeholder="请选择..." v-model="form.examinesName1"></el-input> | ||||
|                 <div class="select-left" v-if="form.examines.length"> | ||||
|                   <span v-for="(item, index) in form.examines" :key="index">{{ item.name }}</span> | ||||
|                 <el-input class="AppAnnounceDetail-select__input" size="small" placeholder="请选择..." v-model="form.evaluatorsNames"></el-input> | ||||
|                 <div class="select-left" v-if="form.evaluatorsList.length"> | ||||
|                   <span v-for="(item, index) in form.evaluatorsList" :key="index">{{ item.name }}</span> | ||||
|                 </div> | ||||
|                 <i v-if="!form.examines.length">请选择</i> | ||||
|                 <div class="select-right">{{ form.examines.length ? '重新选择' : '选择' }}</div> | ||||
|                 <i v-if="!form.evaluatorsList.length">请选择</i> | ||||
|                 <div class="select-right">{{ form.evaluatorsList.length ? '重新选择' : '选择' }}</div> | ||||
|               </div> | ||||
|             </ai-user-selecter> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="评分人员" style="width: 100%" prop="examinesName2" :rules="[{required: true, message: '请选择评分人员', trigger: 'change'}]"> | ||||
|             <ai-user-selecter :instance="instance" v-model="form.examines1" @change="e => onUserChange(e, 'examinesName2')"> | ||||
|           <el-form-item label="评分人员" style="width: 100%" prop="scorerNames" :rules="[{required: true, message: '请选择评分人员', trigger: 'change'}]"> | ||||
|             <ai-user-selecter :instance="instance" v-model="form.scorerList" @change="e => onUserChange(e, 'scorerNames')"> | ||||
|               <div class="AppAnnounceDetail-select"> | ||||
|                 <el-input class="AppAnnounceDetail-select__input" size="small" placeholder="请选择..." v-model="form.examinesName2"></el-input> | ||||
|                 <div class="select-left" v-if="form.examines1.length"> | ||||
|                   <span v-for="(item, index) in form.examines1" :key="index">{{ item.name }}</span> | ||||
|                 <el-input class="AppAnnounceDetail-select__input" size="small" placeholder="请选择..." v-model="form.scorerNames"></el-input> | ||||
|                 <div class="select-left" v-if="form.scorerList.length"> | ||||
|                   <span v-for="(item, index) in form.scorerList" :key="index">{{ item.name }}</span> | ||||
|                 </div> | ||||
|                 <i v-if="!form.examines1.length">请选择</i> | ||||
|                 <div class="select-right">{{ form.examines1.length ? '重新选择' : '选择' }}</div> | ||||
|                 <i v-if="!form.scorerList.length">请选择</i> | ||||
|                 <div class="select-right">{{ form.scorerList.length ? '重新选择' : '选择' }}</div> | ||||
|               </div> | ||||
|             </ai-user-selecter> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="开始结束时间" style="width: 100%" prop="date" :rules="[{required: true, message: '请选择开始结束时间', trigger: 'change'}]"> | ||||
|             <el-date-picker | ||||
|               v-model="form.date" | ||||
|               type="daterange" | ||||
|               type="datetimerange" | ||||
|               size="small" | ||||
|               range-separator="至" | ||||
|               value-format="yyyy-MM-dd hh-mm-ss" | ||||
|               start-placeholder="开始日期" | ||||
|               end-placeholder="结束日期"> | ||||
|             </el-date-picker> | ||||
| @@ -116,12 +119,12 @@ | ||||
|         info: {}, | ||||
|         form: { | ||||
|           date: '', | ||||
|           name: '', | ||||
|           type: '', | ||||
|           examines: [], | ||||
|           examines1: [], | ||||
|           examinesName2: '', | ||||
|           examinesName1: '' | ||||
|           templateId: '', | ||||
|           templateName: '', | ||||
|           evaluatorsList: [], | ||||
|           scorerList: [], | ||||
|           evaluatorsNames: '', | ||||
|           scorerNames: '' | ||||
|         }, | ||||
|         search: { | ||||
|           current: 1, | ||||
| @@ -133,10 +136,45 @@ | ||||
|         isLoading: false, | ||||
|         tableData: [], | ||||
|         colConfigs: [ | ||||
|           {prop: 'remarks', label: '异常记录', align: 'center' }, | ||||
|           {prop: 'createTime', label: '创建时间', align: 'center'}, | ||||
|           {prop: 'createUserName', label: '记录人', align: 'center' } | ||||
|           {prop: 'templateName', label: '表单名称', align: 'center', width: 220 }, | ||||
|           {prop: 'createUserName', label: '添加人', align: 'center', width: 150 }, | ||||
|           { | ||||
|             prop: 'status', | ||||
|             align: 'center', | ||||
|             label: '开始结束时间', | ||||
|             render: (h, {row}) => { | ||||
|               return h('span', { | ||||
|               }, `${row.beginTime.split(' ')[0]} - ${row.endTime.split(' ')[0]}`) | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             prop: 'status', | ||||
|             align: 'center', | ||||
|             width: 300, | ||||
|             label: '已填写/剩余份数', | ||||
|             render: (h, {row}) => { | ||||
|               return h('span', { | ||||
|                 style: { | ||||
|                   width: '300px' | ||||
|                 } | ||||
|               }, `${row.overPhr}/${row.totalPhr}`) | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             prop: 'status', | ||||
|             align: 'center', | ||||
|             label: '任务状态', | ||||
|             width: 100, | ||||
|             render: (h, {row}) => { | ||||
|               return h('span', { | ||||
|                 style: { | ||||
|                   color: this.dict.getColor('formStatus', row.status) | ||||
|                 } | ||||
|               }, this.dict.getLabel('formStatus', row.status)) | ||||
|             } | ||||
|           } | ||||
|         ], | ||||
|         list: [], | ||||
|         tabList: ['基本信息', '风险处置'] | ||||
|       } | ||||
|     }, | ||||
| @@ -144,20 +182,19 @@ | ||||
|     created () { | ||||
|       if (this.params && this.params.id) { | ||||
|         this.id = this.params.id | ||||
|         // this.$dict.load(['EP_registerPersonType', 'EP_communityHandleType', 'EP_highRiskIndustries', 'EP_travelType', 'yesOrNo', 'EP_homeStatus2', 'EP_quarantineStrategy', 'EP_controlMethod', 'EP_abnormalType']).then(() => { | ||||
|         //   this.getInfo(this.params.id) | ||||
|         // }) | ||||
|         this.$dict.load(['tastStatus', 'formStatus']).then(() => { | ||||
|           this.getInfo() | ||||
|         }) | ||||
|       } | ||||
|  | ||||
|       this.getList() | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       getInfo (id) { | ||||
|         this.instance.post(`/app/appepidemicpreventionregisterinfo/queryDetailById?id=${id}`).then(res => { | ||||
|       getInfo () { | ||||
|         this.instance.post(`/app/appassessmentscortask/queryDetailById?id=${this.params.id}`).then(res => { | ||||
|           if (res.code === 0) { | ||||
|             this.info = res.data | ||||
|             this.info.travelTypeNames = res.data.travelType.split(',').map(v => { | ||||
|               return this.dict.getLabel('EP_travelType', v) | ||||
|             }).join(',') | ||||
|           } | ||||
|  | ||||
|           this.isLoading = false | ||||
| @@ -166,6 +203,40 @@ | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       changeStatus (id) { | ||||
|         this.$confirm(`确定停用该表单?`).then(() => { | ||||
|           this.instance.post(`/app/appassessmentscortask/stopTaskTemplate?id=${id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success(`停用成功!`) | ||||
|               this.getList() | ||||
|             } | ||||
|           }) | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       getList () { | ||||
|         this.instance.post(`/app/appassessmentscoretemplate/list?size=1000`).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.list = res.data.records.map(v => { | ||||
|               return { | ||||
|                 dictValue: v.id, | ||||
|                 dictName: v.title | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       toDetail (formId) { | ||||
|         this.$emit('change', { | ||||
|           type: 'FormDetail', | ||||
|           params: { | ||||
|             id: this.params.id, | ||||
|             formId: formId || '' | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onUserChange(e, type) { | ||||
|         if (e.length) { | ||||
|           this.form[type] = '1' | ||||
| @@ -174,14 +245,34 @@ | ||||
|         } | ||||
|       }, | ||||
|  | ||||
|       onConfirm (id) { | ||||
|       onClose () { | ||||
|         this.form.date = '' | ||||
|         this.form.name = '' | ||||
|         this.form.templateId = '' | ||||
|         this.form.templateName = '' | ||||
|         this.form.evaluatorsList = [] | ||||
|         this.form.scorerList = [] | ||||
|         this.form.evaluatorsNames = '' | ||||
|         this.form.scorerNames = '' | ||||
|       }, | ||||
|  | ||||
|       onConfirm () { | ||||
|         this.$refs.form.validate((valid) => { | ||||
|           if (valid) { | ||||
|             this.isShow = false | ||||
|             this.$emit('change', { | ||||
|               type: 'Detail', | ||||
|               params: { | ||||
|                 id: id || '' | ||||
|             this.instance.post(`/app/appassessmentscortask/addTemplate`, { | ||||
|               ...this.form, | ||||
|               beginTime: this.form.date[0], | ||||
|               endTime: this.form.date[1], | ||||
|               taskId: this.params.id, | ||||
|               evaluatorsNames: this.form.evaluatorsList.map(v => v.name).join(','), | ||||
|               scorerNames: this.form.scorerList.map(v => v.name).join(','), | ||||
|               date: '' | ||||
|             }).then(res => { | ||||
|               if (res.code == 0) { | ||||
|                 this.$message.success('提交成功!') | ||||
|                 this.isShow = false | ||||
|  | ||||
|                 this.getInfo() | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
|   | ||||
| @@ -8,10 +8,14 @@ | ||||
|       <ai-card title="基础信息"> | ||||
|         <template #content> | ||||
|           <ai-wrapper> | ||||
|             <ai-info-item label="任务名称" isLine :value="info.taskTitle"></ai-info-item> | ||||
|             <ai-info-item label="创建时间" :value="info.createTime"></ai-info-item> | ||||
|             <ai-info-item label="群发时间" :value="info.choiceTime"></ai-info-item> | ||||
|             <ai-info-item label="结束时间" :value="info.taskEndTime" v-if="info.sendChannel === '1'"></ai-info-item> | ||||
|             <ai-info-item label="表单名称" :value="info.templateName"></ai-info-item> | ||||
|             <ai-info-item label="参评人" :value="info.evaluatorsNames"></ai-info-item> | ||||
|             <ai-info-item label="开始时间" :value="info.beginTime"></ai-info-item> | ||||
|             <ai-info-item label="评分人" :value="info.scorerNames"></ai-info-item> | ||||
|             <ai-info-item label="结束时间" :value="info.endTime"></ai-info-item> | ||||
|             <ai-info-item label="填写情况"> | ||||
|               <span>已填写{{ info.overPhr }}份,还剩{{ info.totalPhr }}份</span> | ||||
|             </ai-info-item> | ||||
|           </ai-wrapper> | ||||
|         </template> | ||||
|       </ai-card> | ||||
| @@ -27,11 +31,18 @@ | ||||
|             <div class="bottom"> | ||||
|               <ai-search-bar> | ||||
|                 <template #left> | ||||
|                   <el-button type="primary" @click="isShow = true">导出明细</el-button> | ||||
|                   <ai-download | ||||
|                     :instance="instance" | ||||
|                     :url="`/app/appassessmentscortask/export?id=${params.formId}&type=0&name=${search1.name}&status=${search1.status}`" | ||||
|                     fileName="填写统计" | ||||
|                     :disabled="tableData1.length == 0"> | ||||
|                     <el-button size="small" type="primary">导出明细</el-button> | ||||
|                   </ai-download> | ||||
|                   <ai-select | ||||
|                     v-model="search1.type" | ||||
|                     v-model="search1.status" | ||||
|                     clearable | ||||
|                     placeholder="请选择完成情况"> | ||||
|                     placeholder="请选择完成情况" | ||||
|                     :selectList="dictList"> | ||||
|                   </ai-select> | ||||
|                 </template> | ||||
|                 <template #right> | ||||
| @@ -40,8 +51,8 @@ | ||||
|                     size="small" | ||||
|                     placeholder="请输入参评人、评分人姓名" | ||||
|                     clearable | ||||
|                     v-throttle="() => {search.current = 1, getList()}" | ||||
|                     @clear="search.current = 1, search.name = '', getList()" | ||||
|                     v-throttle="() => {search1.current = 1, getList1()}" | ||||
|                     @clear="search1.current = 1, search1.name = '', getList1()" | ||||
|                     suffix-icon="iconfont iconSearch"> | ||||
|                   </el-input> | ||||
|                 </template> | ||||
| @@ -54,7 +65,7 @@ | ||||
|                 tableSize="small" | ||||
|                 :current.sync="search1.current" | ||||
|                 :size.sync="search1.size" | ||||
|                 @getList="getMemberInfo"> | ||||
|                 @getList="getList1"> | ||||
|                 <el-table-column slot="user" label="成员" align="left"> | ||||
|                   <template slot-scope="{ row }"> | ||||
|                     <div class="userinfo"> | ||||
| @@ -70,16 +81,22 @@ | ||||
|             <div class="bottom"> | ||||
|               <ai-search-bar> | ||||
|                 <template #left> | ||||
|                   <el-button type="primary" @click="isShow = true">导出明细</el-button> | ||||
|                   <ai-download | ||||
|                     :instance="instance" | ||||
|                     :url="`/app/appassessmentscortask/export?id=${params.formId}&type=1&name=${search1.name}`" | ||||
|                     fileName="填写统计" | ||||
|                     :disabled="tableData2.length == 0"> | ||||
|                     <el-button size="small" type="primary">导出列表</el-button> | ||||
|                   </ai-download> | ||||
|                 </template> | ||||
|                 <template #right> | ||||
|                   <el-input | ||||
|                     v-model="search1.name" | ||||
|                     v-model="search2.name" | ||||
|                     size="small" | ||||
|                     placeholder="请输入参评人姓名" | ||||
|                     clearable | ||||
|                     v-throttle="() => {search.current = 1, getList()}" | ||||
|                     @clear="search.current = 1, search.name = '', getList()" | ||||
|                     v-throttle="() => {search2.current = 1, getList2()}" | ||||
|                     @clear="search2.current = 1, search2.name = '', getList2()" | ||||
|                     suffix-icon="iconfont iconSearch"> | ||||
|                   </el-input> | ||||
|                 </template> | ||||
| @@ -93,14 +110,6 @@ | ||||
|                 :current.sync="search2.current" | ||||
|                 :size.sync="search2.size" | ||||
|                 @getList="getGroupInfo"> | ||||
|                 <el-table-column slot="user" label="群主" align="center"> | ||||
|                   <template slot-scope="{ row }"> | ||||
|                     <div class="userinfo"> | ||||
|                       <span>{{ row.groupOwnerName }}</span> | ||||
|                       <span style="color: #999">{{ row.mainDepartmentName }}</span> | ||||
|                     </div> | ||||
|                   </template> | ||||
|                 </el-table-column> | ||||
|               </ai-table> | ||||
|             </div> | ||||
|           </div> | ||||
| @@ -111,7 +120,6 @@ | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   import { mapState } from 'vuex' | ||||
|   export default { | ||||
|     name: 'Detail', | ||||
|  | ||||
| @@ -124,141 +132,97 @@ | ||||
|     data () { | ||||
|       return { | ||||
|         total1: 0, | ||||
|         isShowPhone: false, | ||||
|         total2: 0, | ||||
|         user1: [], | ||||
|         user2: [], | ||||
|         name1: '', | ||||
|         name2: '', | ||||
|         radio1: '未执行', | ||||
|         search1: { | ||||
|           current: 1, | ||||
|           size: 10, | ||||
|           deptartId: '', | ||||
|           type: 0, | ||||
|           sendStatus: '0' | ||||
|           name: '', | ||||
|           status: '' | ||||
|         }, | ||||
|         search2: { | ||||
|           current: 1, | ||||
|           size: 10, | ||||
|           deptartId: '', | ||||
|           type: 1, | ||||
|           sendStatus: '0' | ||||
|           name: '' | ||||
|         }, | ||||
|         memberInfo: {}, | ||||
|         groupInfo: {}, | ||||
|         tableData1: [], | ||||
|         fileList: [], | ||||
|         tableData2: [], | ||||
|         info: {}, | ||||
|         content: '', | ||||
|         currIndex: 0, | ||||
|         colConfigs1: [ | ||||
|           { slot: 'user', label: '成员' }, | ||||
|           { prop: 'groupCount', label: '预计送达居民群', align: 'center' } | ||||
|           { slot: 'user', label: '参评人' }, | ||||
|           { prop: 'groupCount', label: '评分人', align: 'center' }, | ||||
|           { prop: 'groupCount', label: '提交时间', align: 'center' }, | ||||
|           { prop: 'groupCount', label: '总分', align: 'center' } | ||||
|         ], | ||||
|         colConfigs2: [ | ||||
|           { prop: 'groupName', label: '居民群' }, | ||||
|           { prop: 'memberCount', label: '群人数', align: 'center' }, | ||||
|           { slot: 'user', label: '群主', align: 'center' }, | ||||
|           { prop: 'groupName', label: '参评人' }, | ||||
|           { prop: 'memberCount', label: '评分人数', align: 'center' }, | ||||
|           { slot: 'user', label: '平均分', align: 'center' }, | ||||
|         ], | ||||
|         groups: [], | ||||
|         timer: null, | ||||
|         min: 60, | ||||
|         isDisabled: false, | ||||
|         rejecterId: '' | ||||
|         dictList: [ | ||||
|           { | ||||
|             dictName: '未填报', | ||||
|             dictValue: '0' | ||||
|           }, | ||||
|           { | ||||
|             dictName: '已填报', | ||||
|             dictValue: '1' | ||||
|           } | ||||
|         ] | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     computed: { | ||||
|       ...mapState(['user']) | ||||
|     }, | ||||
|  | ||||
|     created () { | ||||
|       this.getInfo(this.params.id) | ||||
|       this.getInfo(this.params.formId) | ||||
|       this.getList1() | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       getMemberInfo () { | ||||
|         this.instance.post(`/app/appmasssendingtask/detailStatistics`, null, { | ||||
|           params: { | ||||
|             ...this.search1, | ||||
|             taskId: this.params.id | ||||
|           } | ||||
|         }).then(res => { | ||||
|           if (res.code === 0) { | ||||
|             this.tableData1 = res.data.executedList.records | ||||
|             this.total1 = res.data.executedList.total | ||||
|             this.memberInfo = res.data | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       getGroupInfo () { | ||||
|         this.instance.post(`/app/appmasssendingtask/detailStatistics`, null, { | ||||
|           params: { | ||||
|             ...this.search2, | ||||
|             taskId: this.params.id | ||||
|           } | ||||
|         }).then(res => { | ||||
|           if (res.code === 0) { | ||||
|             this.tableData2 = res.data.executedList.records.map(v => { | ||||
|               return { | ||||
|                 ...v, | ||||
|                 groupName: v.groupName || '未命名群聊' | ||||
|               } | ||||
|             }) | ||||
|             this.total2 = res.data.executedList.total | ||||
|             this.groupInfo = res.data | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       getInfo (id) { | ||||
|         this.instance.post(`/app/appmasssendingtask/queryDetailById?id=${id}`).then(res => { | ||||
|         this.instance.post(`/app/appassessmentscortask/taskTemplateDetail?id=${id}`).then(res => { | ||||
|           if (res.code === 0) { | ||||
|             this.info = res.data | ||||
|             if (res.data.status === '4' && res.data.remindTime) { | ||||
|               this.countdown() | ||||
|             } | ||||
|  | ||||
|             const content = res.data.contents.filter(v => v.msgType === '0') | ||||
|  | ||||
|             if (content.length) { | ||||
|               this.content = content[0].content | ||||
|             } | ||||
|  | ||||
|             this.fileList = res.data.contents.filter(v => v.msgType !== '0').map(v => { | ||||
|               return { | ||||
|                 ...v, | ||||
|                 ...v.sysFile | ||||
|               } | ||||
|             }) | ||||
|  | ||||
|             this.info.wxGroups = res.data.wxGroups.map(v => { | ||||
|               this.groups.push(...v.groupIds.split(',')) | ||||
|  | ||||
|               return { | ||||
|                 ...v, | ||||
|                 groupIds: v.groupIds.split(',') | ||||
|               } | ||||
|             }) | ||||
|  | ||||
|             if (res.data.examines && res.data.examines.length) { | ||||
|               const user = res.data.examines.filter(v => v.examineStatus === '2') | ||||
|  | ||||
|               if (user.length) { | ||||
|                 this.rejecterId = user[0].examineUserId | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       cancel (isRefresh) { | ||||
|       getList1 () { | ||||
|         this.instance.post(`/app/appassessmentscortask/assessStatistics`, null, { | ||||
|           params: { | ||||
|             id: this.params.formId, | ||||
|             ...this.search1 | ||||
|           } | ||||
|         }).then(res => { | ||||
|           if (res.code === 0) { | ||||
|             this.tableData1 = res.data.records | ||||
|             this.total1 = res.data.total | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       getList2 () { | ||||
|         this.instance.post(`/app/appassessmentscortask/fillStatistics`, null, { | ||||
|           params: { | ||||
|             id: this.params.formId, | ||||
|             ...this.search2 | ||||
|           } | ||||
|         }).then(res => { | ||||
|           if (res.code === 0) { | ||||
|             this.tableData2 = res.data.records | ||||
|             this.total2 = res.data.total | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       cancel () { | ||||
|         this.$emit('change', { | ||||
|           type: 'List', | ||||
|           isRefresh: !!isRefresh | ||||
|           type: 'Detail', | ||||
|           isRefresh: false, | ||||
|           params: { | ||||
|             id: this.params.id | ||||
|           } | ||||
|         }) | ||||
|       } | ||||
|     } | ||||
| @@ -266,36 +230,36 @@ | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
|   .AppAnnounceDetail { | ||||
|     ::v-deep .AppAnnounceDetail-title { | ||||
|       display: flex; | ||||
|       align-items: center; | ||||
| .AppAnnounceDetail { | ||||
|   ::v-deep .AppAnnounceDetail-title { | ||||
|     display: flex; | ||||
|     align-items: center; | ||||
|  | ||||
|       span { | ||||
|         height: 100%; | ||||
|         line-height: 56px; | ||||
|         margin-right: 32px; | ||||
|         color: #888888; | ||||
|         font-size: 16px; | ||||
|         font-weight: 600; | ||||
|         transition: all ease 0.3s; | ||||
|         border-bottom: 3px solid transparent; | ||||
|         cursor: pointer; | ||||
|         user-select: none; | ||||
|     span { | ||||
|       height: 100%; | ||||
|       line-height: 56px; | ||||
|       margin-right: 32px; | ||||
|       color: #888888; | ||||
|       font-size: 16px; | ||||
|       font-weight: 600; | ||||
|       transition: all ease 0.3s; | ||||
|       border-bottom: 3px solid transparent; | ||||
|       cursor: pointer; | ||||
|       user-select: none; | ||||
|  | ||||
|         &:hover { | ||||
|           color: #222; | ||||
|         } | ||||
|       &:hover { | ||||
|         color: #222; | ||||
|       } | ||||
|  | ||||
|         &:last-child { | ||||
|           margin-right: 0; | ||||
|         } | ||||
|       &:last-child { | ||||
|         margin-right: 0; | ||||
|       } | ||||
|  | ||||
|         &.active { | ||||
|           color: #222222; | ||||
|           border-bottom: 3px solid #2266FF; | ||||
|         } | ||||
|       &.active { | ||||
|         color: #222222; | ||||
|         border-bottom: 3px solid #2266FF; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
|   | ||||
| @@ -9,12 +9,12 @@ | ||||
|           </template> | ||||
|           <template #right> | ||||
|             <el-input | ||||
|               v-model="search.name" | ||||
|               v-model="search.title" | ||||
|               size="small" | ||||
|               placeholder="请输入任务名称" | ||||
|               clearable | ||||
|               v-throttle="() => {search.current = 1, getList()}" | ||||
|               @clear="search.current = 1, search.name = '', getList()" | ||||
|               @clear="search.current = 1, search.title = '', getList()" | ||||
|               suffix-icon="iconfont iconSearch"> | ||||
|             </el-input> | ||||
|           </template> | ||||
| @@ -42,10 +42,11 @@ | ||||
|         :visible.sync="isShow" | ||||
|         width="590px" | ||||
|         title="新建评分任务" | ||||
|         @close="onClose" | ||||
|         @onConfirm="onConfirm"> | ||||
|         <el-form ref="form" :model="form" label-width="110px" label-position="right"> | ||||
|           <el-form-item label="返乡登记" prop="name" :rules="[{required: true, message: '请输入任务名称', trigger: 'blur'}]"> | ||||
|             <el-input v-model="form.name" size="small" placeholder="请输入任务名称"></el-input> | ||||
|           <el-form-item label="评分任务" prop="title" :rules="[{required: true, message: '请输入任务名称', trigger: 'blur'}]"> | ||||
|             <el-input v-model="form.title" size="small" placeholder="请输入任务名称"></el-input> | ||||
|           </el-form-item> | ||||
|         </el-form> | ||||
|       </ai-dialog> | ||||
| @@ -67,16 +68,27 @@ | ||||
|         search: { | ||||
|           current: 1, | ||||
|           size: 10, | ||||
|           name: '' | ||||
|           title: '' | ||||
|         }, | ||||
|         form: { | ||||
|           name: '' | ||||
|           title: '' | ||||
|         }, | ||||
|         colConfigs: [ | ||||
|           { prop: 'name', label: '任务名称' }, | ||||
|           { prop: 'phone', align: 'center', label: '创建人' }, | ||||
|           { prop: 'startTime', align: 'center', label: '更新时间' }, | ||||
|           { prop: 'startAreaName', align: 'center', label: '任务状态' } | ||||
|           { prop: 'title', label: '任务名称' }, | ||||
|           { prop: 'createUserName', align: 'center', label: '创建人' }, | ||||
|           { prop: 'createTime', align: 'center', label: '更新时间' }, | ||||
|           { | ||||
|             prop: 'status', | ||||
|             align: 'center', | ||||
|             label: '任务状态', | ||||
|             render: (h, {row}) => { | ||||
|               return h('span', { | ||||
|                 style: { | ||||
|                   color: this.dict.getColor('tastStatus', row.status) | ||||
|                 } | ||||
|               }, this.dict.getLabel('tastStatus', row.status)) | ||||
|             } | ||||
|           } | ||||
|         ], | ||||
|         ids: [], | ||||
|         tableData: [], | ||||
| @@ -89,14 +101,14 @@ | ||||
|     created () { | ||||
|       this.loading = true | ||||
|  | ||||
|       this.dict.load(['EP_riskLevel', 'EP_handleType', 'modeType', 'EP_riskStatus', 'EP_source']).then(() => { | ||||
|       this.dict.load(['tastStatus']).then(() => { | ||||
|         this.getList() | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       getList () { | ||||
|         this.instance.post(`/app/appepidemicpreventionregisterinfo/list`, null, { | ||||
|         this.instance.post(`/app/appassessmentscortask/list`, null, { | ||||
|           params: { | ||||
|             ...this.search | ||||
|           } | ||||
| @@ -113,14 +125,27 @@ | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onConfirm (id) { | ||||
|       onClose () { | ||||
|         this.form.title = '' | ||||
|       }, | ||||
|  | ||||
|       toDetail (id) { | ||||
|         this.$emit('change', { | ||||
|           type: 'Detail', | ||||
|           params: { | ||||
|             id | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onConfirm () { | ||||
|         this.$refs.form.validate((valid) => { | ||||
|           if (valid) { | ||||
|             this.isShow = false | ||||
|             this.$emit('change', { | ||||
|               type: 'FormDetail', | ||||
|               params: { | ||||
|                 id: id || '' | ||||
|             this.instance.post(`/app/appassessmentscortask/addOrUpdate?title=${this.form.title}`).then(res => { | ||||
|               if (res.code == 0) { | ||||
|                 this.$message.success('提交成功!') | ||||
|                 this.getList() | ||||
|                 this.isShow = false | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
| @@ -129,7 +154,7 @@ | ||||
|  | ||||
|       remove(id) { | ||||
|         this.$confirm('确定删除该数据?').then(() => { | ||||
|           this.instance.post(`/app/appepidemicpreventionregisterinfo/delete?id=${id}`).then(res => { | ||||
|           this.instance.post(`/app/appassessmentscortask/delete?id=${id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('删除成功!') | ||||
|               this.getList() | ||||
|   | ||||
| @@ -9,7 +9,6 @@ | ||||
| <script> | ||||
|   import Add from './components/Add' | ||||
|   import List from './components/List' | ||||
|   import Detail from './components/Detail' | ||||
|  | ||||
|   export default { | ||||
|     name: 'AppScoringTemplate', | ||||
| @@ -29,18 +28,12 @@ | ||||
|     }, | ||||
|  | ||||
|     components: { | ||||
|       Detail, | ||||
|       List, | ||||
|       Add | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       onChange (data) { | ||||
|         if (data.type === 'Detail') { | ||||
|           this.component = 'Detail' | ||||
|           this.params = data.params | ||||
|         } | ||||
|  | ||||
|         if (data.type === 'Add') { | ||||
|           this.component = 'Add' | ||||
|           this.params = data.params | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <template> | ||||
|   <ai-detail class="form-add"> | ||||
|     <ai-title :title="pageTitle" slot="title" isShowBack  @onBackClick="cancel(false)"> | ||||
|     <ai-title title="问卷表单" slot="title" isShowBack  @onBackClick="cancel(false)"> | ||||
|       <template #rightBtn> | ||||
|         <el-button type="primary" icon="iconfont iconRepulsebeifen" @click="toPublish">保存模板</el-button> | ||||
|       </template> | ||||
| @@ -70,6 +70,7 @@ | ||||
|                   <span>{{ i + 1 }}. </span> | ||||
|                   <h2>{{ item.label }}</h2> | ||||
|                 </div> | ||||
|                 <p>{{ item.describe }}</p> | ||||
|                 <div class="left-item__item--wrapper"> | ||||
|                   <template v-if="(item.type === 'radio')" > | ||||
|                     <div class="radio-item" v-for="(field, index) in item.options" :key="index" > | ||||
| @@ -199,6 +200,14 @@ | ||||
|             <el-input placeholder="标题名称" :maxlength="200" show-word-limit v-model="currTarget.label"></el-input> | ||||
|           </div> | ||||
|         </div> | ||||
|         <div class="right-item" v-if="activeIndex > -1"> | ||||
|           <div class="right-item__title no-solid"> | ||||
|             <h2>说明文字</h2> | ||||
|           </div> | ||||
|           <div class="right-item__content"> | ||||
|             <el-input placeholder="说明文字" :maxlength="200" show-word-limit v-model="currTarget.describe"></el-input> | ||||
|           </div> | ||||
|         </div> | ||||
|         <div class="right-item right-item__select" v-if="currTarget.type === 'radio' || currTarget.type === 'select' || currTarget.type === 'checkbox'"> | ||||
|           <div class="right-item__title no-solid"> | ||||
|             <h2>选项设置</h2> | ||||
| @@ -347,70 +356,6 @@ | ||||
|           </template> | ||||
|         </div> | ||||
|       </el-scrollbar> | ||||
|       <ai-dialog | ||||
|         :visible.sync="isShowAdd" | ||||
|         width="800px" | ||||
|         customFooter | ||||
|         title="发布"> | ||||
|         <el-form label-position="top" class="publish" ref="form" label-width="120px" :model="form"> | ||||
|           <div class="form-item__wrapper"> | ||||
|             <div class="form-title"> | ||||
|               <h2>基本信息</h2> | ||||
|             </div> | ||||
|             <div class="form-field"> | ||||
|               <i>*</i> | ||||
|               <h2>截止时间</h2> | ||||
|               <span>(表单截止后,用户打开表单会提示此表单已结束)</span> | ||||
|             </div> | ||||
|             <div class="form-item__container"> | ||||
|               <el-radio-group v-model="form.periodValidityType"> | ||||
|                 <el-radio label="0">永久有效</el-radio> | ||||
|                 <el-radio label="1">自定义时间</el-radio> | ||||
|               </el-radio-group> | ||||
|             </div> | ||||
|             <div class="form-item__container" v-if="form.periodValidityType === '1'"> | ||||
|               <el-date-picker | ||||
|                 v-model="form.periodValidityEndTime" | ||||
|                 value-format="yyyy-MM-dd HH:mm:ss" | ||||
|                 type="datetime" | ||||
|                 size="small" | ||||
|                 :picker-options="pickerOptions" | ||||
|                 placeholder="截止时间"> | ||||
|               </el-date-picker> | ||||
|             </div> | ||||
|             <div class="form-field"> | ||||
|               <i>*</i> | ||||
|               <h2>匹配客户方式</h2> | ||||
|               <span>(将参与活动的微信客户和企业微信客户匹配)</span> | ||||
|             </div> | ||||
|             <div class="form-item__container"> | ||||
|               <el-radio-group v-model="form.wechatId"> | ||||
|                 <el-radio label="0">客户微信ID匹配</el-radio> | ||||
|               </el-radio-group> | ||||
|             </div> | ||||
|           </div> | ||||
|           <div class="form-item__wrapper"> | ||||
|             <div class="form-title"> | ||||
|               <h2>提交次数限制</h2> | ||||
|               <span>此功能发布后不可修改</span> | ||||
|             </div> | ||||
|             <div class="form-field"> | ||||
|               <i>*</i> | ||||
|               <h2>提交次数</h2> | ||||
|             </div> | ||||
|             <div class="form-item__container"> | ||||
|               <el-radio-group v-model="form.commitType"> | ||||
|                 <el-radio label="0">不限次数</el-radio> | ||||
|                 <el-radio label="1">限提交一次</el-radio> | ||||
|               </el-radio-group> | ||||
|             </div> | ||||
|           </div> | ||||
|         </el-form> | ||||
|         <template #footer> | ||||
|           <el-button @click="isShowAdd = false">返回</el-button> | ||||
|           <el-button type="primary" @click="onConfirm(1)">完成并发布</el-button> | ||||
|         </template> | ||||
|       </ai-dialog> | ||||
|     </template> | ||||
|   </ai-detail> | ||||
| </template> | ||||
| @@ -436,7 +381,6 @@ | ||||
|  | ||||
|     data () { | ||||
|       return { | ||||
|         isShowAdd: false, | ||||
|         components: components, | ||||
|         targetList: [], | ||||
|         form: { | ||||
| @@ -446,12 +390,6 @@ | ||||
|           isShowTableExplain: true, | ||||
|           isShowBtn: true, | ||||
|           headPicture: [], | ||||
|           commitType: '1', | ||||
|           periodValidityType: '0', | ||||
|           actionNotice: '1', | ||||
|           dynamicNotice: '1', | ||||
|           periodValidityEndTime: '', | ||||
|           shareStatus: '0', | ||||
|           count: 0, | ||||
|           wechatId: '0', | ||||
|           type: 0, | ||||
| @@ -479,37 +417,6 @@ | ||||
|         return {} | ||||
|       }, | ||||
|  | ||||
|       pageTitle () { | ||||
|         let typeName = '新增' | ||||
|         let itemName = '问卷调查' | ||||
|  | ||||
|         if (this.params.id) { | ||||
|           typeName = '编辑' | ||||
|         } | ||||
|  | ||||
|         if (this.params.type == 0) { | ||||
|           itemName = '问卷调查' | ||||
|         } | ||||
|  | ||||
|         if (this.params.type == 1) { | ||||
|           itemName = '考试测评' | ||||
|         } | ||||
|  | ||||
|         if (this.params.type == 2) { | ||||
|           itemName = '报名登记' | ||||
|         } | ||||
|  | ||||
|         if (this.params.type == 3) { | ||||
|           itemName = '满意调查' | ||||
|         } | ||||
|  | ||||
|         if (this.params.type == 4) { | ||||
|           itemName = '投票评选' | ||||
|         } | ||||
|  | ||||
|         return `${typeName}${itemName}` | ||||
|       }, | ||||
|  | ||||
|       currComponentTitle () { | ||||
|         if (this.activeIndex >= 0) { | ||||
|           return this.targetList[this.activeIndex].fixedLabel + '设置' | ||||
| @@ -545,54 +452,9 @@ | ||||
|       }, | ||||
|  | ||||
|       init () { | ||||
|         if (this.params.type == 0) { | ||||
|           this.form.headPicture = [{ | ||||
|             url: 'https://cdn.cunwuyun.cn/dvcp/h5/form/interview.png' | ||||
|           }] | ||||
|         } | ||||
|         if (this.params.type == 1) { | ||||
|           this.form.title = '考试测评' | ||||
|           this.form.headPicture = [{ | ||||
|             url: 'https://cdn.cunwuyun.cn/dvcp/h5/form/exam.png' | ||||
|           }] | ||||
|         } | ||||
|         if (this.params.type == 2) { | ||||
|           this.form.title = '报名登记' | ||||
|           this.form.headPicture = [{ | ||||
|             url: 'https://cdn.cunwuyun.cn/dvcp/h5/form/apply.png' | ||||
|           }] | ||||
|         } | ||||
|         if (this.params.type == 3) { | ||||
|           this.form.title = '满意调查' | ||||
|           this.form.headPicture = [{ | ||||
|             url: 'https://cdn.cunwuyun.cn/dvcp/h5/form/satisfaction.png' | ||||
|           }] | ||||
|         } | ||||
|         if (this.params.type == 4) { | ||||
|           this.form.title = '投票评选' | ||||
|           this.form.headPicture = [{ | ||||
|             url: 'https://cdn.cunwuyun.cn/dvcp/h5/form/vote.png' | ||||
|           }] | ||||
|         } | ||||
|       }, | ||||
|  | ||||
|       downloadImg (url) { | ||||
|         let image = new Image() | ||||
|         image.setAttribute('crossOrigin', 'anonymous') | ||||
|         image.onload = function() { | ||||
|           let canvas = document.createElement('canvas') | ||||
|           canvas.width = image.width | ||||
|           canvas.height = image.height | ||||
|           let context = canvas.getContext('2d') | ||||
|           context.drawImage(image, 0, 0, image.width, image.height) | ||||
|           let url = canvas.toDataURL("image/png") | ||||
|           let a = document.createElement("a") | ||||
|           let event = new MouseEvent("click") | ||||
|           a.download = name || 'photo' | ||||
|           a.href = url | ||||
|           a.dispatchEvent(event) | ||||
|         } | ||||
|         image.src = url | ||||
|         this.form.headPicture = [{ | ||||
|           url: 'https://cdn.cunwuyun.cn/dvcp/h5/form/interview.png' | ||||
|         }] | ||||
|       }, | ||||
|  | ||||
|       onKeyup (e) { | ||||
| @@ -600,7 +462,6 @@ | ||||
|       }, | ||||
|  | ||||
|       onSelcetKeyup (e, index) { | ||||
|         console.log(e, index) | ||||
|         this.$set(this.currTarget.options[index], 'point', e.replace(/[^\d]/g, '')) | ||||
|       }, | ||||
|  | ||||
| @@ -638,36 +499,30 @@ | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|         if (this.params.templateType != 1) { | ||||
|           this.isShowAdd = true | ||||
|         } else { | ||||
|           const fields = this.targetList.map(item => { | ||||
|             return { | ||||
|               fieldType: item.type, | ||||
|               fieldName: item.label, | ||||
|               fieldInfo: JSON.stringify(item) | ||||
|             } | ||||
|           }) | ||||
|  | ||||
|           this.instance.post(`/app/appquestionnairetemplate/addOrUpdate`, { | ||||
|             ...this.form, | ||||
|             fields, | ||||
|             status: 0, | ||||
|             areaId: this.params.templateType == 0 ? this.areaId : '', | ||||
|             id: this.params.id, | ||||
|             headPicture: this.form.headPicture.length ? this.form.headPicture[0].url : '', | ||||
|             type: this.params.type, | ||||
|             templateType: this.params.templateType | ||||
|           }).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('提交成功') | ||||
|         const fields = this.targetList.map(item => { | ||||
|           return { | ||||
|             fieldType: item.type, | ||||
|             fieldName: item.label, | ||||
|             fieldInfo: JSON.stringify(item) | ||||
|           } | ||||
|         }) | ||||
|  | ||||
|               setTimeout(() => { | ||||
|                 this.cancel() | ||||
|               }, 600) | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|         this.instance.post(`/app/appassessmentscoretemplate/addOrUpdate`, { | ||||
|           ...this.form, | ||||
|           fields, | ||||
|           id: this.params.id, | ||||
|           status: 1, | ||||
|           headPicture: this.form.headPicture.length ? this.form.headPicture[0].url : '' | ||||
|         }).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.$message.success('提交成功') | ||||
|  | ||||
|             setTimeout(() => { | ||||
|               this.cancel(true) | ||||
|             }, 600) | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       bindEvent (e) { | ||||
| @@ -686,7 +541,7 @@ | ||||
|       }, | ||||
|  | ||||
|       getInfo (id) { | ||||
|         this.instance.post(`/app/appquestionnairetemplate/queryDetailById?id=${id}`).then(res => { | ||||
|         this.instance.post(`/app/appassessmentscoretemplate/queryDetailById?id=${id}`).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.form = { | ||||
|               ...res.data, | ||||
| @@ -705,59 +560,6 @@ | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onConfirm (status) { | ||||
|         if (this.params.templateType == 1) { | ||||
|           // this.submitTemp() | ||||
|         } | ||||
|  | ||||
|         if (this.form.periodValidityType === '1') { | ||||
|           if (!this.form.periodValidityEndTime) { | ||||
|             return this.$message.error('请选择截止时间') | ||||
|           } | ||||
|  | ||||
|           if (new Date(this.form.periodValidityEndTime).getTime() < Date.now()) { | ||||
|             return this.$message.error('截止时间不能晚于当前时间') | ||||
|           } | ||||
|         } | ||||
|  | ||||
|         const fields = this.targetList.map(item => { | ||||
|           return { | ||||
|             fieldType: item.type, | ||||
|             fieldName: item.label, | ||||
|             fieldInfo: JSON.stringify(item) | ||||
|           } | ||||
|         }) | ||||
|  | ||||
|         this.instance.post(`/app/appquestionnairetemplate/addOrUpdate`, { | ||||
|           ...this.form, | ||||
|           fields, | ||||
|           areaId: this.areaId, | ||||
|           status: status, | ||||
|           id: this.params.isQuote ? '' : this.params.id, | ||||
|           headPicture: this.form.headPicture.length ? this.form.headPicture[0].url : '', | ||||
|           type: this.params.type, | ||||
|           templateType: this.params.templateType, | ||||
|           periodValidityEndTime: this.form.periodValidityType === '1' ? this.form.periodValidityEndTime : '' | ||||
|         }).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             if (this.params.isQuote) { | ||||
|               this.instance.post(`/app/appquestionnairetemplate/quoteCount?id=${this.params.id}`) | ||||
|             } | ||||
|             this.$message.success('提交成功') | ||||
|  | ||||
|             if (status === 0) { | ||||
|               return this.cancel() | ||||
|             } | ||||
|  | ||||
|             this.successInfo = res.data | ||||
|  | ||||
|             this.$nextTick(() => { | ||||
|               this.cancel(true) | ||||
|             }) | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       cancel (isRefresh) { | ||||
|         this.$emit('change', { | ||||
|           type: 'List', | ||||
| @@ -943,6 +745,12 @@ | ||||
|           content: ' '; | ||||
|         } | ||||
|  | ||||
|         & > p { | ||||
|           margin: 0 0 12px 12px; | ||||
|           color: #888; | ||||
|           font-size: 14px; | ||||
|         } | ||||
|  | ||||
|         .left-item__item--remove { | ||||
|           display: flex; | ||||
|           position: absolute; | ||||
|   | ||||
| @@ -1,188 +0,0 @@ | ||||
|  <template> | ||||
|   <ai-detail isHasSidebar v-loading="isLoading"> | ||||
|     <template slot="title"> | ||||
|       <ai-title title="返乡报备详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)"> | ||||
|       </ai-title> | ||||
|     </template> | ||||
|     <template slot="content"> | ||||
|       <AiSidebar :tabTitle="tabList" v-model="currIndex"></AiSidebar> | ||||
|       <div v-show="currIndex === 0"> | ||||
|         <ai-card title="基本信息" v-show="currIndex === 0"> | ||||
|           <template #content> | ||||
|             <ai-wrapper | ||||
|               label-width="120px"> | ||||
|               <ai-info-item label="姓名" :value="info.name"></ai-info-item> | ||||
|               <ai-info-item label="填报时间" :value="info.createTime"></ai-info-item> | ||||
|               <ai-info-item label="身份证号" :value="info.idNumber"></ai-info-item> | ||||
|               <ai-info-item label="手机号码" :value="info.phone"></ai-info-item> | ||||
|               <ai-info-item label="人员类别" :value="dict.getLabel('EP_registerPersonType', info.type)"></ai-info-item> | ||||
|               <ai-info-item label="是否从事高危行业" :value="dict.getLabel('EP_highRiskIndustries', info.highRiskIndustries)"></ai-info-item> | ||||
|             </ai-wrapper> | ||||
|           </template> | ||||
|         </ai-card> | ||||
|         <ai-card title="行程信息"> | ||||
|           <template #content> | ||||
|             <ai-wrapper | ||||
|               label-width="120px"> | ||||
|               <ai-info-item label="出发时间" :value="info.startTime"></ai-info-item> | ||||
|               <ai-info-item label="出发地" > | ||||
|                 <span  :style="{color: info.denger == 1 ? '#FF4466' : '#333'}">{{info.startAreaName}} </span> | ||||
|               </ai-info-item> | ||||
|               <ai-info-item label="出发地详址" isLine :value="info.startAddress"></ai-info-item> | ||||
|               <ai-info-item label="出行方式" :value="info.travelTypeNames"></ai-info-item> | ||||
|               <ai-info-item label="车次/航班" isLine :value="info.trainNo"></ai-info-item> | ||||
|               <ai-info-item label="行程描述" :value="info.description"></ai-info-item> | ||||
|               <ai-info-item label="抵平卡口" :value="info.gatewayName"></ai-info-item> | ||||
|               <ai-info-item label="抵平时间" :value="info.arriveTime"></ai-info-item> | ||||
|               <ai-info-item label="目的地" :value="info.arriveAreaName"></ai-info-item> | ||||
|               <ai-info-item label="目的地详址" isLine :value="info.arriveAddress"></ai-info-item> | ||||
|             </ai-wrapper> | ||||
|           </template> | ||||
|         </ai-card> | ||||
|         <ai-card title="健康状况"> | ||||
|           <template #content> | ||||
|             <ai-wrapper | ||||
|               label-width="120px"> | ||||
|               <ai-info-item label="是否有风险旅居史" v-if="info.fromHighRiskArea === '1'"> | ||||
|                 <span style="color: red">{{ info.highRiskAreaName }}</span> | ||||
|               </ai-info-item> | ||||
|               <ai-info-item label="是否有风险旅居史" v-else value="否"></ai-info-item> | ||||
|               <ai-info-item label="7天内是否接触新冠确诊或疑似患者"> | ||||
|                 <span :style="{color: info.contactPatients === '1' ? 'red' : ''}">{{ dict.getLabel('yesOrNo', info.contactPatients) }}</span> | ||||
|               </ai-info-item> | ||||
|               <ai-info-item label="当前健康状况" v-if="info.abnormalHealth === '1'"> | ||||
|                 <span style="color: red">{{ dict.getLabel('EP_abnormalType', info.abnormalType) }}</span> | ||||
|               </ai-info-item> | ||||
|               <ai-info-item label="当前健康状况" v-else value="否"></ai-info-item> | ||||
|             </ai-wrapper> | ||||
|           </template> | ||||
|         </ai-card> | ||||
|       </div> | ||||
|       <div v-show="currIndex === 1"> | ||||
|         <ai-card title="风险处置"> | ||||
|           <template #right> | ||||
|             <el-button type="primary" v-if="info.status === '0'" @click="release">解除异常</el-button> | ||||
|           </template> | ||||
|           <template #content> | ||||
|             <ai-wrapper | ||||
|               label-width="120px"> | ||||
|               <ai-info-item label="姓名" :value="info.name"></ai-info-item> | ||||
|               <ai-info-item label="填报时间" :value="info.createTime"></ai-info-item> | ||||
|               <ai-info-item label="身份证号" :value="info.idNumber"></ai-info-item> | ||||
|               <ai-info-item label="手机号码" :value="info.phone"></ai-info-item> | ||||
|               <ai-info-item label="人员类别" :value="dict.getLabel('EP_registerPersonType', info.type)"></ai-info-item> | ||||
|               <ai-info-item label="是否从事高危行业" :value="dict.getLabel('EP_highRiskIndustries', info.highRiskIndustries)"></ai-info-item> | ||||
|             </ai-wrapper> | ||||
|           </template> | ||||
|         </ai-card> | ||||
|         <ai-card title="风险处理意见"> | ||||
|           <template #content> | ||||
|             <ai-table | ||||
|               :isShowPagination="false" | ||||
|               tableSize="small" | ||||
|               border | ||||
|               :tableData="info.riskDisposalList" | ||||
|               :col-configs="colConfigs" | ||||
|               @getList="() => {}"> | ||||
|             </ai-table> | ||||
|           </template> | ||||
|         </ai-card> | ||||
|         <ai-card title="社区初排" v-if="info.cmAdvanceDisposal"> | ||||
|           <template #content> | ||||
|             <ai-wrapper | ||||
|               style="margin-bottom: 20px;" | ||||
|               label-width="120px"> | ||||
|               <ai-info-item label="处置意见" :value="dict.getLabel('EP_communityHandleType', info.cmAdvanceDisposal.communityHandleType)"></ai-info-item> | ||||
|               <ai-info-item v-if="info.cmAdvanceDisposal.communityHandleType === '1'" label="居家状态" :value="dict.getLabel('EP_homeStatus2', info.cmAdvanceDisposal.homeStatus)"></ai-info-item> | ||||
|               <ai-info-item v-if="info.cmAdvanceDisposal.communityHandleType === '1'" label="隔离时间" :value="info.cmAdvanceDisposal.quarantineBeginTime + ' - ' + info.cmAdvanceDisposal.quarantineEndTime"></ai-info-item> | ||||
|               <ai-info-item v-if="info.cmAdvanceDisposal.communityHandleType === '1'" label="隔离策略" :value="dict.getLabel('EP_quarantineStrategy', info.cmAdvanceDisposal.quarantineStrategy)"></ai-info-item> | ||||
|               <ai-info-item v-if="info.cmAdvanceDisposal.communityHandleType === '1'" label="管控方式" :value="dict.getLabel('EP_controlMethod', info.cmAdvanceDisposal.controlMethod)"></ai-info-item> | ||||
|               <ai-info-item v-if="info.cmAdvanceDisposal.communityHandleType === '1'" label="图片" isLine> | ||||
|                 <ai-uploader | ||||
|                   :instance="instance" | ||||
|                   :value="info.cmAdvanceDisposal.fileList" | ||||
|                   disabled | ||||
|                   :limit="9"> | ||||
|                 </ai-uploader> | ||||
|               </ai-info-item> | ||||
|               <ai-info-item v-if="info.cmAdvanceDisposal.communityHandleType === '2'" label="风险解除证明文件" isLine> | ||||
|                 <ai-uploader | ||||
|                   :instance="instance" | ||||
|                   :value="info.cmAdvanceDisposal.proveFileList" | ||||
|                   disabled | ||||
|                   :limit="9"> | ||||
|                 </ai-uploader> | ||||
|               </ai-info-item> | ||||
|             </ai-wrapper> | ||||
|             <ai-empty style="margin-bottom: 60px;" v-if="!info.cmAdvanceDisposal"></ai-empty> | ||||
|           </template> | ||||
|         </ai-card> | ||||
|       </div> | ||||
|     </template> | ||||
|   </ai-detail> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   export default { | ||||
|     name: 'Detail', | ||||
|  | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object, | ||||
|       params: Object | ||||
|     }, | ||||
|  | ||||
|     data () { | ||||
|       return { | ||||
|         info: {}, | ||||
|         isShow: false, | ||||
|         currIndex: 0, | ||||
|         isLoading: false, | ||||
|         tableData: [], | ||||
|         colConfigs: [ | ||||
|           {prop: 'remarks', label: '异常记录', align: 'center' }, | ||||
|           {prop: 'createTime', label: '创建时间', align: 'center'}, | ||||
|           {prop: 'createUserName', label: '记录人', align: 'center' } | ||||
|         ], | ||||
|         tabList: ['基本信息', '风险处置'] | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     created () { | ||||
|       this.isLoading = true | ||||
|       if (this.params && this.params.id) { | ||||
|         this.id = this.params.id | ||||
|         this.$dict.load(['EP_registerPersonType', 'EP_communityHandleType', 'EP_highRiskIndustries', 'EP_travelType', 'yesOrNo', 'EP_homeStatus2', 'EP_quarantineStrategy', 'EP_controlMethod', 'EP_abnormalType']).then(() => { | ||||
|           this.getInfo(this.params.id) | ||||
|         }) | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       getInfo (id) { | ||||
|         this.instance.post(`/app/appepidemicpreventionregisterinfo/queryDetailById?id=${id}`).then(res => { | ||||
|           if (res.code === 0) { | ||||
|             this.info = res.data | ||||
|             this.info.travelTypeNames = res.data.travelType.split(',').map(v => { | ||||
|               return this.dict.getLabel('EP_travelType', v) | ||||
|             }).join(',') | ||||
|           } | ||||
|  | ||||
|           this.isLoading = false | ||||
|         }).catch(() => { | ||||
|           this.isLoading = false | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       cancel () { | ||||
|         this.$emit('change', { | ||||
|           type: 'List', | ||||
|           isRefresh: true | ||||
|         }) | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| </style> | ||||
| @@ -5,16 +5,16 @@ | ||||
|       <div class="content"> | ||||
|         <ai-search-bar bottomBorder> | ||||
|           <template #left> | ||||
|             <el-button type="primary" @click="toAdd">新建模板</el-button> | ||||
|             <el-button type="primary" @click="toAdd('')">新建模板</el-button> | ||||
|           </template> | ||||
|           <template #right> | ||||
|             <el-input | ||||
|               v-model="search.name" | ||||
|               v-model="search.title" | ||||
|               size="small" | ||||
|               placeholder="请输入姓名、手机号" | ||||
|               clearable | ||||
|               v-throttle="() => {search.current = 1, getList()}" | ||||
|               @clear="search.current = 1, search.name = '', getList()" | ||||
|               @clear="search.current = 1, search.title = '', getList()" | ||||
|               suffix-icon="iconfont iconSearch"> | ||||
|             </el-input> | ||||
|           </template> | ||||
| @@ -31,7 +31,8 @@ | ||||
|           <el-table-column slot="options" width="140px" fixed="right" label="操作" align="center"> | ||||
|             <template slot-scope="{ row }"> | ||||
|               <div class="table-options"> | ||||
|                 <el-button type="text" @click="toDetail(row.id)">详情</el-button> | ||||
|                 <el-button type="text" @click="toAdd(row.id)">编辑</el-button> | ||||
|                 <el-button type="text" @click="changeStatus(row.id, row.status)">{{ row.status === '0' ? '启用' : '停用' }}</el-button> | ||||
|                 <el-button type="text" @click="remove(row.id)">删除</el-button> | ||||
|               </div> | ||||
|             </template> | ||||
| @@ -56,12 +57,12 @@ | ||||
|         search: { | ||||
|           current: 1, | ||||
|           size: 10, | ||||
|           name: '' | ||||
|           title: '' | ||||
|         }, | ||||
|         colConfigs: [ | ||||
|           { prop: 'name', label: '模板名称' }, | ||||
|           { prop: 'phone', align: 'center', label: '创建人' }, | ||||
|           { prop: 'startTime', align: 'center', label: '更新时间' } | ||||
|           { prop: 'title', label: '模板名称' }, | ||||
|           { prop: 'createUserName', align: 'center', label: '创建人' }, | ||||
|           { prop: 'createTime', align: 'center', label: '更新时间' } | ||||
|         ], | ||||
|         ids: [], | ||||
|         tableData: [], | ||||
| @@ -80,7 +81,7 @@ | ||||
|  | ||||
|     methods: { | ||||
|       getList () { | ||||
|         this.instance.post(`/app/appepidemicpreventionregisterinfo/list`, null, { | ||||
|         this.instance.post(`/app/appassessmentscoretemplate/list`, null, { | ||||
|           params: { | ||||
|             ...this.search | ||||
|           } | ||||
| @@ -115,9 +116,20 @@ | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       changeStatus (id, status) { | ||||
|         this.$confirm(`确定${status === '0' ? '启用' : '停用'}该数据?`).then(() => { | ||||
|           this.instance.post(`/app/appassessmentscoretemplate/stopRelease?id=${id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success(`${status === '0' ? '启用' : '停用'}成功!`) | ||||
|               this.getList() | ||||
|             } | ||||
|           }) | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       remove(id) { | ||||
|         this.$confirm('确定删除该数据?').then(() => { | ||||
|           this.instance.post(`/app/appepidemicpreventionregisterinfo/delete?id=${id}`).then(res => { | ||||
|           this.instance.post(`/app/appassessmentscoretemplate/delete?id=${id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('删除成功!') | ||||
|               this.getList() | ||||
|   | ||||
| @@ -10,6 +10,7 @@ export const components = [ | ||||
| 				fixedLabel: '单选', | ||||
| 				value: '', | ||||
| 				points: '', | ||||
| 				describe: '', | ||||
| 				icon: 'iconradio', | ||||
| 				isShowPoints: false, | ||||
| 				required: true, | ||||
| @@ -46,6 +47,7 @@ export const components = [ | ||||
| 				type: 'checkbox', | ||||
| 				label: '多选', | ||||
| 				fixedLabel: '多选', | ||||
| 				describe: '', | ||||
| 				points: '', | ||||
| 				icon: 'iconcheck_box', | ||||
| 				isShowPoints: false, | ||||
| @@ -90,6 +92,7 @@ export const components = [ | ||||
| 				fixedLabel: '单下拉框', | ||||
| 				value: '', | ||||
| 				points: '', | ||||
| 				describe: '', | ||||
| 				icon: 'iconSelect', | ||||
| 				isShowPoints: false, | ||||
| 				required: true, | ||||
| @@ -132,6 +135,7 @@ export const components = [ | ||||
| 			{ | ||||
| 				type: 'input', | ||||
| 				label: '单行填空', | ||||
| 				describe: '', | ||||
| 				fixedLabel: '单行填空', | ||||
| 				value: '', | ||||
| 				pointType: '0', | ||||
| @@ -146,6 +150,7 @@ export const components = [ | ||||
| 			{ | ||||
| 				type: 'textarea', | ||||
| 				label: '多行填空', | ||||
| 				describe: '', | ||||
| 				fixedLabel: '多行填空', | ||||
| 				pointType: '0', | ||||
| 				icon: 'icontext_area', | ||||
| @@ -168,6 +173,7 @@ export const components = [ | ||||
| 				type: 'upload', | ||||
| 				label: '上传图片', | ||||
| 				fixedLabel: '上传图片', | ||||
| 				describe: '', | ||||
| 				value: '', | ||||
| 				icon: 'iconpic', | ||||
| 				isShowPoints: false, | ||||
|   | ||||
| @@ -50,6 +50,7 @@ | ||||
|       <template slot="content"> | ||||
|         <ai-card title="基本信息"> | ||||
|           <template #content> | ||||
|             <div class="tips" v-if="!id"><i class="el-icon-warning"></i>换届选举仅采取不记名(匿名)投票</div> | ||||
|             <div class="add-form"> | ||||
|               <el-form ref="form" :model="form" :rules="formRules" size="small"  label-width="150px"> | ||||
|  | ||||
| @@ -234,6 +235,15 @@ export default { | ||||
|     confirm() { | ||||
|       this.$refs.form.validate((valid) => { | ||||
|           if (valid) { | ||||
|             if(this.form.electionMethod == 0) { | ||||
|               if(this.form.chooseNumber != this.form.candidateUsers.length) { | ||||
|                 return this.$message.error('候选人数与应选人数应相等') | ||||
|               } | ||||
|             } else if(this.form.electionMethod == 1) { | ||||
|               if(this.form.chooseNumber >= this.form.candidateUsers.length) { | ||||
|                 return this.$message.error('候选人数应多于应选人数') | ||||
|               } | ||||
|             } | ||||
|             this.instance.post(`/app/appgeneralelectioninfo/addOrUpdate`,{ | ||||
|               ...this.form | ||||
|             }).then(res => { | ||||
| @@ -258,5 +268,17 @@ export default { | ||||
|   ::v-deep .el-date-editor .el-input { | ||||
|     width: 100%; | ||||
|   } | ||||
|  | ||||
|   .tips { | ||||
|     width: 100%; | ||||
|     border: 1px solid #f82; | ||||
|     background-color: #fff3e9; | ||||
|     color: #f82; | ||||
|     padding: 8px 16px; | ||||
|     box-sizing: border-box; | ||||
|     border-radius: 4px; | ||||
|     margin-bottom: 32px; | ||||
|     font-size: 13px; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -17,10 +17,9 @@ | ||||
|         <ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" @getList="getList" :col-configs="colConfigs" :dict="dict"> | ||||
|           <el-table-column slot="options" label="操作" fixed="right" align="center"> | ||||
|             <template slot-scope="{ row }"> | ||||
|               <!-- <el-button v-show="row.status==0" type="text" @click.native="toAdd(row.id, true)">编辑</el-button> --> | ||||
|               <el-button type="text" @click.native="toAdd(row.id)">详情</el-button> | ||||
|               <el-button type="text" :disabled="row.status==2" @click.native="startEnd(row.id, false)">结束</el-button> | ||||
|               <el-button type="text" @click.native="toStatistics(row.id)">统计</el-button> | ||||
|               <el-button type="text" v-show="row.status!=2" :disabled="row.status==2" @click.native="startEnd(row.id, row.status)">{{row.status == 0? '开启':'结束'}}</el-button> | ||||
|               <el-button type="text" v-show="row.status != 0" @click.native="toStatistics(row.id)">统计</el-button> | ||||
|               <el-button type="text" @click.native="handleDelete(row.id)">删除</el-button> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
| @@ -82,7 +81,7 @@ export default { | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     toAdd(id,flag) { | ||||
|     toAdd(id) { | ||||
|       this.$emit('change', { | ||||
|         type: 'electionAdd', | ||||
|         params: { | ||||
| @@ -107,12 +106,24 @@ export default { | ||||
|       } | ||||
|       this.getList() | ||||
|     }, | ||||
|     // 结束 | ||||
|     // 开启、结束 | ||||
|     startEnd(id, status) { | ||||
|       this.$confirm('投票正在进行中,确定要提前结束吗?').then(() => { | ||||
|         this.instance.post(`/app/appgeneralelectioninfo/start-end?id=${id}&start=${status}`).then(res=>{ | ||||
|       let title = '' | ||||
|       let bool = null | ||||
|       let tips = '' | ||||
|       if(status == 0) { | ||||
|         title = '未到投票开始时间,确定要提前开始吗?' | ||||
|         bool = true | ||||
|         tips = '开启成功' | ||||
|       } else if(status == 1) { | ||||
|         title = '投票正在进行中,确定要提前结束吗?' | ||||
|         bool = false | ||||
|         tips = '结束成功' | ||||
|       } | ||||
|       this.$confirm(title).then(() => { | ||||
|         this.instance.post(`/app/appgeneralelectioninfo/start-end?id=${id}&start=${bool}`).then(res=>{ | ||||
|           if(res.code == 0) { | ||||
|             this.$message.success('结束成功') | ||||
|             this.$message.success(tips) | ||||
|             this.getList() | ||||
|           } | ||||
|         }) | ||||
|   | ||||
| @@ -15,9 +15,15 @@ import organizationSetting from "./components/organizationSetting.vue"; | ||||
| export default { | ||||
|   name: "AppOrganizationChange", | ||||
|   label: "组织换届", | ||||
|   provide() { | ||||
|     return { | ||||
|       ...this.$props | ||||
|     } | ||||
|   }, | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     permissions: Function | ||||
|   }, | ||||
|   components: { | ||||
|     List, | ||||
| @@ -27,16 +33,16 @@ export default { | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|     currentPage() { | ||||
|       if (this.$route.hash == "#add") { | ||||
|       const {hash} = this.$route | ||||
|       if (["#add","#makeup"].includes(hash)) { | ||||
|         return addChange | ||||
|       } else if (this.$route.hash == "#setting") { | ||||
|       } else if (hash == "#setting") { | ||||
|         return organizationSetting | ||||
|       } else return List | ||||
|     } | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       component: "List", | ||||
|       params: {}, | ||||
|       include: [], | ||||
|       selected: {}, | ||||
| @@ -47,10 +53,6 @@ export default { | ||||
|       this.params = data.params; | ||||
|     }, | ||||
|   }, | ||||
|   created() { | ||||
|     let {organizationId: id, organizationName: name} = this.user.info | ||||
|     this.selected = {id, name} | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
|   | ||||
| @@ -1,11 +1,7 @@ | ||||
| <template> | ||||
|   <ai-list class="List"> | ||||
|     <template slot="title"> | ||||
|       <ai-title title="组织换届" isShowBottomBorder> | ||||
|         <template slot="rightBtn"> | ||||
|           <el-button size="small" type="primary" icon="iconfont iconAdd" @click="toSetting('')">换届设置</el-button> | ||||
|         </template> | ||||
|       </ai-title> | ||||
|       <ai-title title="组织换届" isShowBottomBorder/> | ||||
|     </template> | ||||
|     <template #left> | ||||
|       <ai-tree-menu title="组织目录" searchPlaceholder="请输入组织名称" @search="onSearch"> | ||||
| @@ -19,15 +15,16 @@ | ||||
|       </ai-tree-menu> | ||||
|     </template> | ||||
|     <template slot="content" class="content"> | ||||
|       <ai-title title="届次信息"> | ||||
|         <template #rightBtn> | ||||
|           <el-button size="small" type="primary" @click="toSetting(selected.id)" v-if="permissions('app_apporganizationchangeconfig')">换届设置</el-button> | ||||
|         </template> | ||||
|       </ai-title> | ||||
|       <el-tabs v-model="currIndex"> | ||||
|         <el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label"> | ||||
|           <component :ref="tab.name" v-if="currIndex == String(i)" :is="tab.comp" lazy :instance="instance" :selected="selected" | ||||
|                      :dict="dict" :permissions="permissions" v-on="$listeners"/> | ||||
|           <component :ref="tab.name" v-if="currIndex==i" :is="tab.comp" lazy :selected="selected" v-on="$listeners"/> | ||||
|         </el-tab-pane> | ||||
|       </el-tabs> | ||||
|       <div class="add_btn"> | ||||
|         <el-button size="small" type="primary" icon="iconfont iconAdd" @click="toAdd('')">新增换届</el-button> | ||||
|       </div> | ||||
|     </template> | ||||
|   </ai-list> | ||||
| </template> | ||||
| @@ -39,12 +36,7 @@ import history from './history.vue' | ||||
|  | ||||
| export default { | ||||
|   name: 'List', | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     permissions: Function, | ||||
|     dict: Object, | ||||
|     selected: Object | ||||
|   }, | ||||
|   inject: ['permissions', 'instance', 'dict'], | ||||
|   data() { | ||||
|     return { | ||||
|       tabs: [ | ||||
| @@ -52,6 +44,7 @@ export default { | ||||
|         {label: '历史届次', name: 'history', comp: history, permission: ''} | ||||
|       ], | ||||
|       currIndex: '0', | ||||
|       selected: null | ||||
|     } | ||||
|   }, | ||||
|   components: { | ||||
| @@ -60,25 +53,15 @@ export default { | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|  | ||||
|     orgTree() { | ||||
|       return this.$refs.tree?.$refs?.partyTree | ||||
|     }, | ||||
|   }, | ||||
|  | ||||
|   methods: { | ||||
|     showNeighbourSetting(id) { | ||||
|       this.$router.push({query: {id}, hash: "#ns"}) | ||||
|     }, | ||||
|     onTreeChange(e) { | ||||
|       this.$emit("update:selected", e) | ||||
|       this.selected = e | ||||
|       this.$refs[this.tabs[Number(this.currIndex)].name][0].getList(e.id) | ||||
|     }, | ||||
|  | ||||
|     onSearch(v) { | ||||
|       this.orgTree.filter(v) | ||||
|       this.$refs.tree?.$refs?.partyTree?.filter(v) | ||||
|     }, | ||||
|  | ||||
|     filterNode(value, data) { | ||||
|       if (!value) return true | ||||
|       return data.name.indexOf(value) !== -1 | ||||
| @@ -86,9 +69,13 @@ export default { | ||||
|     toAdd(id) { | ||||
|       this.$router.push({hash: "#add", query: {id}}) | ||||
|     }, | ||||
|     toSetting(id) { | ||||
|       this.$router.push({hash: "#setting", query: {id}}) | ||||
|     toSetting(oid) { | ||||
|       this.$router.push({hash: "#setting", query: {oid, new: 1}}) | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     const {organizationId: id, organizationName: name} = this.user.info | ||||
|     this.selected = {id, name} | ||||
|   } | ||||
| } | ||||
| </script> | ||||
| @@ -135,6 +122,7 @@ export default { | ||||
|  | ||||
|     .ai-list__content--right-wrapper { | ||||
|       width: 100%; | ||||
|       padding-top: 0; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| <template> | ||||
|   <section class="addChange"> | ||||
|     <ai-detail> | ||||
|       <ai-title slot="title" title="新增换届" isShowBottomBorder isShowBack @onBackClick="cancel(false)"/> | ||||
|       <ai-title slot="title" :title="pageTitle" isShowBottomBorder isShowBack @onBackClick="cancel(false)"/> | ||||
|       <template #content> | ||||
|         <ai-card title="基本信息"> | ||||
|           <template #content> | ||||
| @@ -83,10 +83,13 @@ export default { | ||||
|     permissions: Function, | ||||
|     dict: Object, | ||||
|   }, | ||||
|   computed: { | ||||
|     isMakeUp: v => v.$route.hash == "#makeup", | ||||
|     pageTitle: v => v.isMakeUp ? "补录换届" : "新增换届" | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       form: { | ||||
|         addOrMakeup: true, | ||||
|         changeTime: '', | ||||
|         sessionTime: '', | ||||
|         serveList: [],   // 任职人员列表 | ||||
| @@ -99,8 +102,18 @@ export default { | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     cancel() { | ||||
|       this.$router.push({}) | ||||
|     // getDetail() { | ||||
|     //   const {id: organizationId} = this.$route.query | ||||
|     //   organizationId && this.instance.post(`/app/apporganizationgeneralelection/queryDetailByOrganizationId`, null, { | ||||
|     //     params: {organizationId} | ||||
|     //   }).then(res => { | ||||
|     //     if (res?.data) { | ||||
|     //       this.form = res.data | ||||
|     //     } | ||||
|     //   }) | ||||
|     // }, | ||||
|     cancel(refresh) { | ||||
|       refresh ? this.$router.push({}) : this.$router.back() | ||||
|     }, | ||||
|     handleDelete(i, type) { | ||||
|       this.$confirm("确定要删除该数据?").then(() => { | ||||
| @@ -114,8 +127,9 @@ export default { | ||||
|     confirm() { | ||||
|       this.$refs.form.validate((valid) => { | ||||
|         if (valid) { | ||||
|           const addOrMakeup = !this.isMakeUp | ||||
|           this.instance.post(`/app/apporganizationgeneralelection/add`, { | ||||
|             ...this.form | ||||
|             ...this.form, addOrMakeup | ||||
|           }).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('提交成功') | ||||
|   | ||||
| @@ -0,0 +1,190 @@ | ||||
| <template> | ||||
|   <section class="detailPanel"> | ||||
|     <div class="itemTitle"> | ||||
|       <b>本届任职{{editable?"(必填)":""}}</b> | ||||
|       <span type="text" class="iconfont iconAdd" @click="showDialog({type:0})">添加任职人员</span> | ||||
|     </div> | ||||
|     <el-table :data="serveList" border header-cell-class-name="table-header" cell-class-name="table-cell"> | ||||
|       <el-table-column label="职位" width="180px" prop="position"/> | ||||
|       <el-table-column label="姓名" prop="name"/> | ||||
|       <el-table-column label="操作" width="120px" align="center"> | ||||
|         <div slot-scope="{row,$index}" class="table-operation"> | ||||
|           <span class="iconfont iconEdit" @click="showDialog(row,$index)" title="编辑"/> | ||||
|           <span class="iconfont iconDelete" title="删除" @click="deleteItem($index,0)"/> | ||||
|         </div> | ||||
|       </el-table-column> | ||||
|     </el-table> | ||||
|     <div class="itemTitle"> | ||||
|       <b>本届候选人</b> | ||||
|       <span type="text" class="iconfont iconAdd" @click="showDialog({type:1})">添加候选人</span> | ||||
|     </div> | ||||
|     <el-table :data="candidateList" border header-cell-class-name="table-header" cell-class-name="table-cell"> | ||||
|       <el-table-column label="职位" width="180px" prop="position"/> | ||||
|       <el-table-column label="候选人" prop="name"/> | ||||
|       <el-table-column label="操作" width="120px" align="center"> | ||||
|         <div slot-scope="{row,$index}" class="table-operation"> | ||||
|           <span class="iconfont iconEdit" @click="showDialog(row,$index)" title="编辑"/> | ||||
|           <span class="iconfont iconDelete" title="删除" @click="deleteItem($index,1)"/> | ||||
|         </div> | ||||
|       </el-table-column> | ||||
|     </el-table> | ||||
|     <el-dialog :visible.sync="dialog.visible" width="520px" :title="dialog.title" class="editStyle" | ||||
|                @close="dialog={visible: false},$refs.editListItemForm.clearValidate()"> | ||||
|       <el-form ref="editListItemForm" size="small" :model="dialog" :rules="rules" label-width="100px" | ||||
|                :validate-on-rule-change="false"> | ||||
|         <el-form-item label="职位:" prop="position"> | ||||
|           <el-input v-model="dialog.position" placeholder="请输入..."/> | ||||
|         </el-form-item> | ||||
|         <el-form-item :label="currentList.name+':'" prop="name"> | ||||
|           <el-input v-if="dialog.type==0" v-model="dialog.name" placeholder="请输入..."/> | ||||
|           <div v-else> | ||||
|             <el-input type="textarea" :rows="3" v-model="dialog.name" placeholder="请输入..."/> | ||||
|             <span style="color:#999;font-size: 12px">输入候选人姓名,用空格隔开</span> | ||||
|           </div> | ||||
|         </el-form-item> | ||||
|  | ||||
|       </el-form> | ||||
|       <div slot="footer" class="footerBtns"> | ||||
|         <el-button size="small" @click="dialog.visible=false">取消</el-button> | ||||
|         <el-button size="small" type="primary" @click="submitAdd">确认</el-button> | ||||
|       </div> | ||||
|     </el-dialog> | ||||
|   </section> | ||||
|  | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   export default { | ||||
|     name: "detailPanel", | ||||
|     model: { | ||||
|       prop: "value", | ||||
|       event: "change" | ||||
|     }, | ||||
|     props: { | ||||
|       value: Object, | ||||
|       instance: Function, | ||||
|       dict: Object, | ||||
|       permissions: Function, | ||||
|       editable: {type: Boolean, default: false} | ||||
|     }, | ||||
|     data() { | ||||
|       return { | ||||
|         dialog: { | ||||
|           visible: false, | ||||
|           title: "", | ||||
|           name: "", | ||||
|           changeTime: "" | ||||
|         }, | ||||
|         serveList: [], | ||||
|         candidateList: [] | ||||
|       } | ||||
|     }, | ||||
|     computed: { | ||||
|       lists() { | ||||
|         return {candidateList: this.candidateList, serveList: this.serveList} | ||||
|       }, | ||||
|       currentList() { | ||||
|         let initData = { | ||||
|           0: {name: "姓名", dialogTitle: "本届任职人", list: "serveList"}, | ||||
|           1: {name: "候选人", dialogTitle: "本届候选人", list: "candidateList"} | ||||
|         } | ||||
|         return initData[this.dialog.type || 0] | ||||
|       }, | ||||
|       rules() { | ||||
|         return { | ||||
|           name: [{required: true, message: "请输入" + this.currentList.name, trigger: "change"}], | ||||
|           position: [{required: true, message: "请输入职位", trigger: "change"}], | ||||
|         } | ||||
|       }, | ||||
|     }, | ||||
|     watch: { | ||||
|       lists: { | ||||
|         deep: true, | ||||
|         handler() { | ||||
|           this.$emit('change', this.lists) | ||||
|         } | ||||
|       }, | ||||
|       value: { | ||||
|         deep: true, | ||||
|         handler(v) { | ||||
|           if (v) { | ||||
|             v.candidateList && (this.candidateList = v.candidateList) | ||||
|             v.serveList && (this.serveList = v.serveList) | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
|     methods: { | ||||
|       showDialog(v, rowIndex) { | ||||
|         this.dialog = {...this.dialog, ...v, rowIndex} | ||||
|         this.dialog.title = (this.dialog.rowIndex==0? "编辑" : "添加") + this.currentList.dialogTitle | ||||
|         this.dialog.visible = true | ||||
|       }, | ||||
|       submitAdd() { | ||||
|         this.$refs.editListItemForm.validate(v => { | ||||
|           if (v) { | ||||
|             if (this.dialog.rowIndex > -1) { | ||||
|               this.$data[this.currentList.list].splice(this.dialog.rowIndex, 1, this.dialog) | ||||
|             } else this.$data[this.currentList.list].push(this.dialog) | ||||
|             this.dialog.visible = false | ||||
|             this.dialog.rowIndex==undefined ? this.$emit("refresh",1) : this.$emit("refresh",2); | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|       deleteItem(index,type) { | ||||
|         this.$confirm(`是否要删除该${type==0?'本届任职人':'本届候选人'}`, {type: "error"}).then(() => { | ||||
|           type==0?this.$data["serveList"].splice(index, 1):this.$data["candidateList"].splice(index, 1) | ||||
|           this.$emit("refresh",0) | ||||
|         }).catch(() => { | ||||
|         }) | ||||
|       } | ||||
|     }, | ||||
|     mounted() { | ||||
|       this.$nextTick(() => { | ||||
|         if (this.value) { | ||||
|           let v = JSON.parse(JSON.stringify(this.value)) | ||||
|           v.candidateList && (this.candidateList = v.candidateList) | ||||
|           v.serveList && (this.serveList = v.serveList) | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
|   .detailPanel { | ||||
|     .itemTitle + .el-table { | ||||
|       margin-top: 16px; | ||||
|     } | ||||
|  | ||||
|     .el-table + .itemTitle { | ||||
|       margin-top: 24px; | ||||
|     } | ||||
|  | ||||
|     ::v-deep .table-header { | ||||
|       box-sizing: border-box; | ||||
|       border-right: 1px solid #d0d4dc !important; | ||||
|  | ||||
|       .cell { | ||||
|         padding-left: 32px; | ||||
|       } | ||||
|  | ||||
|       &.is-center > .cell { | ||||
|         padding-left: 10px !important; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     ::v-deep .table-cell { | ||||
|       height: 44px; | ||||
|       color: #333; | ||||
|  | ||||
|       .cell { | ||||
|         padding-left: 32px; | ||||
|       } | ||||
|  | ||||
|       &.is-center > .cell { | ||||
|         padding-left: 10px !important; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </style> | ||||
| @@ -3,26 +3,18 @@ | ||||
|  | ||||
|     <ai-search-bar> | ||||
|       <template #left> | ||||
|         <el-button type="primary" icon="iconfont iconEdit" @click="fillupAdd('')">补录</el-button> | ||||
|         <el-button type="primary" icon="iconfont iconEdit" @click="$router.push({hash:'#makeup',query:{}})">补录</el-button> | ||||
|       </template> | ||||
|       <template #right> | ||||
|         <el-input size="small" placeholder="请输入届次" v-model="search.name" clearable | ||||
|                   v-throttle="() => {page.current = 1, getList()}"/> | ||||
|         <el-button icon="iconfont iconResetting" @click="reset('')">重置</el-button> | ||||
|       </template> | ||||
|     </ai-search-bar> | ||||
|     <ai-table | ||||
|         class="detail-table__table" | ||||
|         :tableData="tableData" | ||||
|         :col-configs="colConfigs" | ||||
|         :total="page.total" | ||||
|         :current.sync="current" | ||||
|         :size.sync="size" | ||||
|         @getList="getJobList"> | ||||
|     <ai-table :tableData="tableData" :col-configs="colConfigs" :isShowPagination="false" @getList="getList"> | ||||
|       <el-table-column slot="options" label="操作" align="center"> | ||||
|         <template slot-scope="{ row }"> | ||||
|           <el-button type="text" @click="jobEdit(row.id)">编辑</el-button> | ||||
|           <el-button type="text" @click="jobDelete(row.id)">删除</el-button> | ||||
|           <el-button type="text" @click="handleEdit(row.id)">编辑</el-button> | ||||
|           <el-button type="text" @click="handleDelete(row.id)">删除</el-button> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|     </ai-table> | ||||
| @@ -32,41 +24,60 @@ | ||||
| <script> | ||||
| export default { | ||||
|   name: "history", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     permissions: Function, | ||||
|     dict: Object, | ||||
|   inject: { | ||||
|     permissions: {}, | ||||
|     instance: {}, | ||||
|     dict: {} | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       search: { | ||||
|         name: '', | ||||
|       }, | ||||
|       page: { | ||||
|         current: 1, | ||||
|         size: 10, | ||||
|         total: 0 | ||||
|       } | ||||
|       tableData: [] | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
|     colConfigs() { | ||||
|       return [ | ||||
|         {prop: '', label: '届次', align: 'left'}, | ||||
|         {prop: '', label: '换届日期', align: 'center'}, | ||||
|         {prop: '', label: '操作时间', align: 'center'}, | ||||
|         {prop: '', label: '操作人', align: 'center'}, | ||||
|         {prop: 'sessionTime', label: '届次', align: 'left'}, | ||||
|         {prop: 'changeTime', label: '换届日期', align: 'center'}, | ||||
|         {prop: 'createTime', label: '操作时间', align: 'center'}, | ||||
|         {prop: 'createUserName', label: '操作人', align: 'center'}, | ||||
|         {slot: 'options'}, | ||||
|       ] | ||||
|     } | ||||
|     }, | ||||
|     oid: v => v.$attrs.selected.id | ||||
|   }, | ||||
|   methods: { | ||||
|     fillupAdd() {}, | ||||
|     reset() {}, | ||||
|     getList() {} | ||||
|     handleEdit(id) { | ||||
|       this.$router.push({hash: "#makeup", query: {id}}) | ||||
|     }, | ||||
|     handleDelete(id) { | ||||
|       this.$confirm("是否要删除该条届次记录?").then(() => { | ||||
|         this.instance.post("/app/apporganizationgeneralelection/delete", null, { | ||||
|           params: {id} | ||||
|         }).then(res => { | ||||
|           if (res?.code == 0) { | ||||
|             this.$message.success("删除成功!") | ||||
|             this.getList() | ||||
|           } | ||||
|         }) | ||||
|       }).catch(() => 0) | ||||
|     }, | ||||
|     getList() { | ||||
|       const {oid: organizationId} = this | ||||
|       this.instance.post("/app/apporganizationgeneralelection/list", null, { | ||||
|         params: {...this.search, organizationId} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.tableData = res.data | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|  | ||||
|     this.getList() | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|   | ||||
| @@ -1,56 +1,64 @@ | ||||
| <template> | ||||
|   <section class="moment"> | ||||
|     <ai-title title="总体概况" class="mar-b8"> | ||||
|       <template slot="rightBtn"> | ||||
|         <el-button size="small" type="text" icon="iconfont iconEdit" @click="toEdit('')">修改</el-button> | ||||
|       </template> | ||||
|     </ai-title> | ||||
|     <ai-wrapper> | ||||
|       <ai-info-item label="本届换届时间" :value="111"/> | ||||
|       <ai-info-item label="换届类型" :value="111"/> | ||||
|       <ai-info-item label="下届换届时间" :value="111"/> | ||||
|       <ai-info-item label="当前届次" :value="111"/> | ||||
|     </ai-wrapper> | ||||
|     <ai-title title="本届任职" class="mar-b8"> | ||||
|       <template slot="rightBtn"> | ||||
|         <el-button size="small" type="text" icon="iconfont iconAdd" @click="dialogJob=true">添加任职人员</el-button> | ||||
|       </template> | ||||
|     </ai-title> | ||||
|     <ai-table | ||||
|         class="detail-table__table" | ||||
|         :tableData="tableData" | ||||
|         :col-configs="colConfigs" | ||||
|         :total="totalJob" | ||||
|         :current.sync="current" | ||||
|         :size.sync="size" | ||||
|         @getList="getJobList"> | ||||
|       <el-table-column slot="options" label="操作" align="center"> | ||||
|         <template slot-scope="{ row }"> | ||||
|           <el-button type="text" @click="jobEdit(row.id)">编辑</el-button> | ||||
|           <el-button type="text" @click="jobDelete(row.id)">删除</el-button> | ||||
|     <template v-if="detail.id"> | ||||
|       <ai-title title="总体概况" class="mar-b8"> | ||||
|         <template slot="rightBtn"> | ||||
|           <el-button size="small" type="text" icon="iconfont iconEdit" @click="toEdit(oid)">修改</el-button> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|     </ai-table> | ||||
|     <ai-title title="本届候选人" class="mar-b8"> | ||||
|       <template slot="rightBtn"> | ||||
|         <el-button size="small" type="text" icon="iconfont iconAdd" @click="dialogCandidate = true">添加候选人</el-button> | ||||
|       </template> | ||||
|     </ai-title> | ||||
|     <ai-table | ||||
|         class="detail-table__table" | ||||
|         :tableData="tableData" | ||||
|         :col-configs="colConfigs" | ||||
|         :total="totalJob" | ||||
|         :current.sync="current" | ||||
|         :size.sync="size" | ||||
|         @getList="getJobList"> | ||||
|       <el-table-column slot="options" label="操作" align="center"> | ||||
|         <template slot-scope="{ row }"> | ||||
|           <el-button type="text" @click="jobEdit(row.id)">编辑</el-button> | ||||
|           <el-button type="text" @click="jobDelete(row.id)">删除</el-button> | ||||
|       </ai-title> | ||||
|       <ai-wrapper> | ||||
|         <ai-info-item label="本届换届时间" :value="detail.changeTime"/> | ||||
|         <ai-info-item label="换届类型" :value="dict.getLabel('organizationChangeType',detail.type)"/> | ||||
|         <ai-info-item label="下届换届时间" :value="detail.nextChangeTime"/> | ||||
|         <ai-info-item label="当前届次" :value="detail.sessionTime"/> | ||||
|       </ai-wrapper> | ||||
|       <ai-title title="本届任职" class="mar-b8"> | ||||
|         <template slot="rightBtn"> | ||||
|           <el-button size="small" type="text" icon="iconfont iconAdd" @click="dialogJob=true">添加任职人员</el-button> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|     </ai-table> | ||||
|       </ai-title> | ||||
|       <ai-table | ||||
|           class="detail-table__table" | ||||
|           :tableData="tableData" | ||||
|           :col-configs="colConfigs" | ||||
|           :total="totalJob" | ||||
|           :current.sync="current" | ||||
|           :size.sync="size" | ||||
|           @getList="getJobList"> | ||||
|         <el-table-column slot="options" label="操作" align="center"> | ||||
|           <template slot-scope="{ row }"> | ||||
|             <el-button type="text" @click="jobEdit(row.id)">编辑</el-button> | ||||
|             <el-button type="text" @click="jobDelete(row.id)">删除</el-button> | ||||
|           </template> | ||||
|         </el-table-column> | ||||
|       </ai-table> | ||||
|       <ai-title title="本届候选人" class="mar-b8"> | ||||
|         <template slot="rightBtn"> | ||||
|           <el-button size="small" type="text" icon="iconfont iconAdd" @click="dialogCandidate = true">添加候选人</el-button> | ||||
|         </template> | ||||
|       </ai-title> | ||||
|       <ai-table | ||||
|           class="detail-table__table" | ||||
|           :tableData="tableData" | ||||
|           :col-configs="colConfigs" | ||||
|           :total="totalJob" | ||||
|           :current.sync="current" | ||||
|           :size.sync="size" | ||||
|           @getList="getJobList"> | ||||
|         <el-table-column slot="options" label="操作" align="center"> | ||||
|           <template slot-scope="{ row }"> | ||||
|             <el-button type="text" @click="jobEdit(row.id)">编辑</el-button> | ||||
|             <el-button type="text" @click="jobDelete(row.id)">删除</el-button> | ||||
|           </template> | ||||
|         </el-table-column> | ||||
|       </ai-table> | ||||
|     </template> | ||||
|     <ai-empty> | ||||
|       <div>暂无换届信息</div> | ||||
|       <el-row type="flex" justify="center" class="mar-t8"> | ||||
|         <ai-highlight content="请点击【@v】完善基础内容后,再进行后续操作" value="换届设置"/> | ||||
|       </el-row> | ||||
|     </ai-empty> | ||||
|     <ai-dialog :visible.sync="dialogJob" title="添加本届任职人" width="720px" @closed="jobForm={}" @onConfirm="handleJobForm"> | ||||
|       <el-form ref="jobForm" size="small" :model="jobForm" :rules="jobRules" label-width="80px"> | ||||
|         <el-form-item label="职位" prop="job"> | ||||
| @@ -77,15 +85,10 @@ | ||||
| <script> | ||||
| export default { | ||||
|   name: "moment", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     permissions: Function, | ||||
|     dict: Object, | ||||
|     selected: Object, | ||||
|   }, | ||||
|   inject: ['permissions', 'instance', 'dict'], | ||||
|   data() { | ||||
|     return { | ||||
|       isEdit: false, | ||||
|       detail: {}, | ||||
|       tableData: [], | ||||
|       totalJob: 0, | ||||
|       current: 1, | ||||
| @@ -121,10 +124,11 @@ export default { | ||||
|         job: [{required: true, message: "请输入职位"}], | ||||
|         name: [{required: true, message: "请输入姓名"}], | ||||
|       } | ||||
|     } | ||||
|     }, | ||||
|     oid: v => v.$attrs.selected.id | ||||
|   }, | ||||
|   mounted() { | ||||
|     this.getList(this.selected.id) | ||||
|   created() { | ||||
|     this.getList() | ||||
|   }, | ||||
|   methods: { | ||||
|     jobEdit() { | ||||
| @@ -136,10 +140,13 @@ export default { | ||||
|     toEdit(id) { | ||||
|       this.$router.push({hash: "#add", query: {id}}) | ||||
|     }, | ||||
|     getList(id) { | ||||
|       this.instance.post(`/app/apporganizationgeneralelection/queryDetailByOrganizationId?organizationId=${id}`).then(res => { | ||||
|     getList() { | ||||
|       const {oid: organizationId} = this | ||||
|       organizationId && this.instance.post(`/app/apporganizationgeneralelection/queryDetailByOrganizationId`, null, { | ||||
|         params: {organizationId} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           console.log(res, '111'); | ||||
|           this.detail = res.data | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|   | ||||
| @@ -1,90 +1,45 @@ | ||||
| <template> | ||||
|   <section class="organizationSetting"> | ||||
|     <!-- <ai-detail class="add" v-if="id && !isEdit"> | ||||
|       <template slot="title"> | ||||
|         <ai-title title="换届选举详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title> | ||||
|       </template> | ||||
|       <template slot="content"> | ||||
|         <ai-card title="基本信息"> | ||||
|           <template #right> | ||||
|             <span style="color:#2266FF;cursor: pointer;font-size: 12px;" class="iconfont iconEdit" v-if="isEdit==false" @click="isEdit = true">修改</span> | ||||
|           </template> | ||||
|           <template #content v-if="isEdit == false"> | ||||
|             <ai-wrapper> | ||||
|               <ai-info-item label="标题" :value="info.title"></ai-info-item> | ||||
|               <ai-info-item label="投票说明" :value="info.votingInstructions"></ai-info-item> | ||||
|               <ai-info-item label="单位名称" :value="info.organizationName"></ai-info-item> | ||||
|               <ai-info-item label="选举方式"> | ||||
|                 {{ info.electionMethod==0? '等额':'差额'}} | ||||
|                 <el-tooltip class="item" effect="dark" content="差额选举:候选人数多于应选人数的选举方式; | ||||
|                   等额选举:候选人数与应选人数相等的选举方式。" placement="top"> | ||||
|                   <i class="el-icon-info" style="margin-right: 8px"></i> | ||||
|                 </el-tooltip> | ||||
|               </ai-info-item> | ||||
|               <ai-info-item label="应选人数" :value="info.candidatesNumber"></ai-info-item> | ||||
|               <ai-info-item label="投票日期" :value="info.votingDate"></ai-info-item> | ||||
|               <ai-info-item label="候选人" isLine> | ||||
|                 <span v-for="(item,index) in candidateUsersList" :key="index"> | ||||
|                   {{ item }} | ||||
|                   <span v-if="index < candidateUsersList.length - 1">、</span> | ||||
|                 </span> | ||||
|               </ai-info-item> | ||||
|               <ai-info-item label="投票人" isLine :value="info.voteUsers"> | ||||
|                 <span v-for="(item,index) in voteUsersList" :key="index"> | ||||
|                   {{ item }} | ||||
|                   <span v-if="index < voteUsersList.length - 1">、</span> | ||||
|                 </span> | ||||
|               </ai-info-item> | ||||
|             </ai-wrapper> | ||||
|           </template> | ||||
|         </ai-card> | ||||
|       </template> | ||||
|     </ai-detail> --> | ||||
|     <ai-detail> | ||||
|       <ai-title slot="title" title="换届设置" isShowBottomBorder isShowBack @onBackClick="cancel(true)"/> | ||||
|       <template slot="content"> | ||||
|         <ai-card title="基本信息"> | ||||
|           <template #content> | ||||
|             <div class="tips"> | ||||
|               <i class="el-icon-warning"></i> | ||||
|               系统将在下次换届时间开始前,对“换届提醒人”进行提醒。提醒方式包括平台消息推送、短信提醒。 | ||||
|             </div> | ||||
|             <div class="add-form"> | ||||
|               <el-form ref="form" :model="form" :rules="formRules" size="small" label-width="150px"> | ||||
|                 <el-form-item label="单位名称"> | ||||
|                   <div>{{ user.info.organizationName }}</div> | ||||
|                 </el-form-item> | ||||
|  | ||||
|                 <el-form-item label="成立时间"> | ||||
|                   <div>{{ createTime }}</div> | ||||
|                 </el-form-item> | ||||
|  | ||||
|                 <el-form-item label="换届类型" prop="type"> | ||||
|                   <el-radio v-model="form.type" label="0">三年换届</el-radio> | ||||
|                   <el-radio v-model="form.type" label="1">五年换届</el-radio> | ||||
|                 </el-form-item> | ||||
|  | ||||
|                 <el-form-item label="单位名称" prop="organizationName"> | ||||
|                   <el-input size="small" disabled placeholder="请选择所属党组织" v-model="form.organizationName"> | ||||
|                     <template slot="append"> | ||||
|                       <ai-party :instance="instance" size="small" :value="form.organizationId" @origin="handlePartyOrgSelect"/> | ||||
|                     </template> | ||||
|                   </el-input> | ||||
|                 </el-form-item> | ||||
|  | ||||
|                 <el-form-item label="换届提醒人" prop="userList"> | ||||
|                   <ai-person-select :instance="instance" :customClicker="true" :chooseUserList="chooseUserList" | ||||
|                                     :url="`/app/appparty/list?partyOrgId=${form.organizationId}`" headerTitle="党员列表" | ||||
|                                     :isMultiple="true" dialogTitle="选择抄送人" @selectPerson="selectUser" class="aipersonselect"> | ||||
|                     <template name="option" v-slot:option="{ item }"> | ||||
|                       <span class="iconfont iconProlife">{{ item.name }}</span> | ||||
|                     </template> | ||||
|                   </ai-person-select> | ||||
|                 </el-form-item> | ||||
|               </el-form> | ||||
|             </div> | ||||
|           </template> | ||||
|         </ai-card> | ||||
|         <el-form ref="SettingForm" :model="form" :rules="formRules" size="small" label-width="150px"> | ||||
|           <ai-card title="基本信息"> | ||||
|             <template #content> | ||||
|               <div class="tips"> | ||||
|                 <i class="el-icon-warning"></i> | ||||
|                 系统将在下次换届时间开始前,对“换届提醒人”进行提醒。提醒方式包括平台消息推送、短信提醒。 | ||||
|               </div> | ||||
|               <el-form-item label="单位名称">{{ org.name }}</el-form-item> | ||||
|               <el-form-item label="成立时间">{{ $dateFormat(org.createTime) }}</el-form-item> | ||||
|               <el-form-item label="换届类型" prop="type"> | ||||
|                 <el-radio v-model="form.type" label="0">三年换届</el-radio> | ||||
|                 <el-radio v-model="form.type" label="1">五年换届</el-radio> | ||||
|               </el-form-item> | ||||
|               <el-form-item label="换届提醒人" prop="userList"> | ||||
|                 <ai-person-select :instance="instance" :customClicker="true" :chooseUserList="chooseUserList" | ||||
|                                   :url="`/app/appparty/list?partyOrgId=${org.id}`" headerTitle="党员列表" | ||||
|                                   :isMultiple="true" dialogTitle="选择抄送人" @selectPerson="selectUser" class="aipersonselect"> | ||||
|                   <template name="option" v-slot:option="{ item }"> | ||||
|                     <span class="iconfont iconProlife">{{ item.name }}</span> | ||||
|                   </template> | ||||
|                 </ai-person-select> | ||||
|               </el-form-item> | ||||
|             </template> | ||||
|           </ai-card> | ||||
|           <ai-card v-if="isInit" title="届次设置"> | ||||
|             <el-form-item label="本届换届时间:" prop="changeTime"> | ||||
|               <el-date-picker v-model="form.changeTime"/> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="下届换届时间:" prop="nextChangeTime"> | ||||
|               <el-date-picker disabled v-model="form.nextChangeTime"/> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="届次:" prop="sessionTime"> | ||||
|               <el-input v-model="form.sessionTime" placeholder="请输入..."/> | ||||
|             </el-form-item> | ||||
|             <detail-panel :instance="instance" v-model="lists" editable/> | ||||
|           </ai-card> | ||||
|         </el-form> | ||||
|       </template> | ||||
|       <template slot="footer" class="footer"> | ||||
|         <el-button class="delete-btn footer-btn" @click="cancel(false)">取消</el-button> | ||||
| @@ -97,14 +52,12 @@ | ||||
|  | ||||
| <script> | ||||
| import {mapState} from 'vuex' | ||||
| import DetailPanel from "./detailPanel"; | ||||
|  | ||||
| export default { | ||||
|   name: "organizationSetting", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|   }, | ||||
|  | ||||
|   components: {DetailPanel}, | ||||
|   inject: ['permissions', 'instance', 'dict'], | ||||
|   data() { | ||||
|     let validUser = (rule, value, callback) => { | ||||
|       if (!value.length) { | ||||
| @@ -115,47 +68,46 @@ export default { | ||||
|     }; | ||||
|     return { | ||||
|       form: { | ||||
|         addOrMakeup: true, | ||||
|         organizationId: '', | ||||
|         organizationName: '', | ||||
|         type: '0', | ||||
|         type: "", | ||||
|         userList: [], | ||||
|         sessionTime: "", | ||||
|         changeTime: "", | ||||
|         nextChangeTime: "" | ||||
|       }, | ||||
|       lists: { | ||||
|         candidateList: [],     //本届候选人 | ||||
|         serveList: []          //本届任职 | ||||
|       }, | ||||
|       formRules: { | ||||
|         type: [{required: true, message: "请选择选举方式", trigger: "blur"}], | ||||
|         organizationName: [{required: true, message: "请选择党组织", trigger: "blur"}], | ||||
|         userList: [{required: true, validator: validUser, trigger: "blur"}], | ||||
|       }, | ||||
|       chooseUserList: [], | ||||
|       createTime: '', | ||||
|       org: null | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']) | ||||
|     ...mapState(['user']), | ||||
|     isInit: v => !!v.form.id, | ||||
|     isNew: v => v.$route.query.new | ||||
|   }, | ||||
|   created() { | ||||
|     this.getDetail() | ||||
|     this.getOrganization() | ||||
|     this.org = new this.MODEL.PartyOrg(this.$route.query.oid) | ||||
|     !this.isNew && this.getDetail() | ||||
|   }, | ||||
|   methods: { | ||||
|     cancel() { | ||||
|       this.$router.back() | ||||
|     }, | ||||
|     // 查询组织关系 | ||||
|     getOrganization() { | ||||
|       this.instance.post(`/app/partyOrganization/queryPartyOrganizationServiceList`).then(res => { | ||||
|         if (res?.data) { | ||||
|           let data = res.data.filter(item => item.id == this.user.info.organizationId) | ||||
|           this.createTime = data[0].createTime | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     getDetail() { | ||||
|       this.instance.post(`/app/apporganizationchangeconfig/queryDetailByOrganizationId?organizationId=${this.user.info.organizationId}`).then((res) => { | ||||
|       const {oid: organizationId} = this.$route.query | ||||
|       this.instance.post(`/app/apporganizationchangeconfig/queryDetailByOrganizationId`, null, { | ||||
|         params: {organizationId} | ||||
|       }).then((res) => { | ||||
|         if (res?.data) { | ||||
|           // this.chooseCandidateList = res.data.candidateUsers | ||||
|           // this.chooseVoteList = res.data.voteUsers | ||||
|           console.log(res); | ||||
|           this.form = res.data | ||||
|           let {candidateList, serveList} = this.form | ||||
|           this.lists = {candidateList, serveList} | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
| @@ -165,26 +117,20 @@ export default { | ||||
|     selectVote(e) { | ||||
|       this.form.voteUsers = e | ||||
|     }, | ||||
|     handlePartyOrgSelect(v) { | ||||
|       if (v) { | ||||
|         this.form.organizationId = v[0]?.id | ||||
|         this.form.organizationName = v[0]?.name | ||||
|  | ||||
|       } | ||||
|     }, | ||||
|     confirm() { | ||||
|       // 换届设置 | ||||
|       this.$refs.form.validate((valid) => { | ||||
|         if (valid) { | ||||
|           this.instance.post(`/app/apporganizationchangeconfig/update`, { | ||||
|             ...this.form | ||||
|       this.$refs.SettingForm.validate(v => { | ||||
|         if (v) { | ||||
|           const {id: organizationId, name: organizationName} = this.org | ||||
|           const action = `/app/apporganizationchangeconfig/${this.isInit ? 'update' : 'add'}` | ||||
|           this.instance.post(action, { | ||||
|             addOrMakeup: true, | ||||
|             ...this.form, organizationId, organizationName | ||||
|           }).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('提交成功') | ||||
|               this.cancel(true) | ||||
|             } | ||||
|           }).catch((err) => { | ||||
|             console.log(err); | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user