From 596940048ca4a9b3a18cd1a1c85e698db504035e Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期五, 08 三月 2024 09:53:05 +0800 Subject: [PATCH] 考核模板修改bug处理 --- src/views/system/point/index.vue | 62 ++++++++++++++++++++++++++----- 1 files changed, 52 insertions(+), 10 deletions(-) diff --git a/src/views/system/point/index.vue b/src/views/system/point/index.vue index 8f50e49..05ca375 100644 --- a/src/views/system/point/index.vue +++ b/src/views/system/point/index.vue @@ -1,6 +1,6 @@ <template> <div class="app-container"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> <el-form-item label="鐐逛綅鍚嶇О" prop="pointName"> <el-input v-model="queryParams.pointName" @@ -39,7 +39,6 @@ icon="el-icon-plus" size="mini" @click="handleAdd" - v-hasPermi="['x:point:add']" >鏂板</el-button> </el-col> <el-col :span="1.5"> @@ -50,7 +49,6 @@ size="mini" :disabled="single" @click="handleUpdate" - v-hasPermi="['x:point:edit']" >淇敼</el-button> </el-col> <el-col :span="1.5"> @@ -61,7 +59,6 @@ size="mini" :disabled="multiple" @click="handleDelete" - v-hasPermi="['x:point:remove']" >鍒犻櫎</el-button> </el-col> <el-col :span="1.5"> @@ -100,14 +97,12 @@ type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" - v-hasPermi="['x:point:edit']" >淇敼</el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" - v-hasPermi="['x:point:remove']" >鍒犻櫎</el-button> </template> </el-table-column> @@ -121,7 +116,7 @@ @pagination="getList" /> - <!-- 娣诲姞鎴栦慨鏀硅繍缁寸偣浣嶅璇濇 --> + <!-- 娣诲姞杩愮淮鐐逛綅瀵硅瘽妗� --> <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body> <el-form ref="form" :model="tempForm" :rules="rules" label-width="120px"> <el-form-item label="鐐逛綅鍚嶇О" prop="pointName"> @@ -155,7 +150,7 @@ <el-button @click="nextAdd" type="primary" plain>缁х画娣诲姞</el-button> </div> </el-form-item> - <div class="point-row" v-for="(point,index) in tempFormList"> + <div class="point-row" v-for="(point,index) in tempFormList"> <div class="row-item"> <el-input :disabled="editingIndex!==index" v-model="point.pointName" placeholder="鐐逛綅鍚嶇О"></el-input> </div> @@ -193,6 +188,42 @@ <el-button @click="cancel">鍙� 娑�</el-button> </div> </el-dialog> + + <!-- 淇敼杩愮淮鐐逛綅瀵硅瘽妗� --> + <el-dialog :title="title" :visible.sync="editOpen" width="500px" append-to-body> + <el-form ref="form" :model="form" :rules="rules" label-width="120px"> + <el-form-item label="鐐逛綅鍚嶇О" prop="pointName"> + <el-input v-model="form.pointName" placeholder="璇疯緭鍏ョ偣浣嶅悕绉�" /> + </el-form-item> + <el-form-item label="杩愮淮鍗曚綅" prop="unitId"> + <el-select v-model="form.unitId" placeholder="杩愮淮鍗曚綅"> + <el-option + v-for="item in unitList" + :key="item.id" + :label="item.value" + :value="item.id"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="鐐逛綅鏃跺尯" prop="timezone"> + <el-date-picker + @change="dateChange" + v-model="form.timezone" + type="daterange" + align="right" + unlink-panels + range-separator="鑷�" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + > + </el-date-picker> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> + <el-button @click="updateCancel">鍙� 娑�</el-button> + </div> + </el-dialog> </div> </template> @@ -224,6 +255,8 @@ title: "", // 鏄惁鏄剧ず寮瑰嚭灞� open: false, + // 淇敼寮圭獥 + editOpen: false, // 杩愮淮鍗曚綅 unitList: [], // 杩愮淮鏃跺尯 @@ -313,6 +346,10 @@ this.open = false; this.reset(); }, + updateCancel() { + this.editOpen = false; + this.reset(); + }, // 琛ㄥ崟閲嶇疆 reset() { this.form = { @@ -357,7 +394,8 @@ const id = row.id || this.ids getPoint(id).then(response => { this.form = response.data; - this.open = true; + this.form.timezone = [this.form.startTime, this.form.endTime] + this.editOpen = true; this.title = "淇敼杩愮淮鐐逛綅"; }); }, @@ -369,6 +407,10 @@ addPointBatch(this.formList).then(response => { this.$modal.msgSuccess("鏂板鎴愬姛"); this.open = false; + // 閲嶇疆 + this.tempForm = {}; + this.tempFormList = []; + this.formList = []; this.getList(); }); } @@ -376,7 +418,7 @@ if (this.form.id != null) { updatePoint(this.form).then(response => { this.$modal.msgSuccess("淇敼鎴愬姛"); - this.open = false; + this.editOpen = false; this.getList(); }); } else { -- Gitblit v1.8.0