From 1c01e669cca92f94eea5d1a73ff60f3bd34b9079 Mon Sep 17 00:00:00 2001 From: liuchengxin <13104445455@163.com> Date: 星期一, 23 五月 2022 16:38:27 +0800 Subject: [PATCH] BUG修改 --- src/views/construction/constructionBatch/index.vue | 19 ++++++++----------- 1 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/views/construction/constructionBatch/index.vue b/src/views/construction/constructionBatch/index.vue index 639584a..8b8287e 100644 --- a/src/views/construction/constructionBatch/index.vue +++ b/src/views/construction/constructionBatch/index.vue @@ -24,7 +24,6 @@ icon="el-icon-plus" size="mini" @click="handleAdd" - v-hasPermi="['oa:constructionBatch:add']" >鏂板</el-button> </el-col> <el-col :span="1.5"> @@ -35,7 +34,6 @@ size="mini" :disabled="single" @click="handleUpdate" - v-hasPermi="['oa:constructionBatch:edit']" >淇敼</el-button> </el-col> <el-col :span="1.5"> @@ -46,7 +44,6 @@ size="mini" :disabled="multiple" @click="handleDelete" - v-hasPermi="['oa:constructionBatch:remove']" >鍒犻櫎</el-button> </el-col> </el-row> @@ -74,7 +71,6 @@ type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" - v-hasPermi="['oa:constructionBatch:edit']" >淇敼</el-button> <el-button size="mini" @@ -82,7 +78,6 @@ class="del-btn" icon="el-icon-delete" @click="handleDelete(scope.row)" - v-hasPermi="['oa:constructionBatch:remove']" >鍒犻櫎</el-button> </template> </el-table-column> @@ -97,22 +92,24 @@ /> <!-- 娣诲姞鎴栦慨鏀规柦宸ユ壒娆″璇濇 --> - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false"> + <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :close-on-click-modal="false"> <el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form-item label="鏂藉伐鎵规" prop="batch"> <el-input v-model="form.batch" maxlength="64" show-word-limit placeholder="璇疯緭鍏ユ柦宸ユ壒娆�" /> </el-form-item> <el-form-item label="鏂藉伐鍛ㄦ湡" prop="date"> <el-date-picker + style="width: 100%" v-model="form.date" type="daterange" + value-format="yyyy-MM-dd" range-separator="鑷�" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="鎴嚦鏃ユ湡"> </el-date-picker> </el-form-item> <el-form-item label="璐熻矗浜�" prop="userId"> - <el-select v-model="form.userId" filterable placeholder="璇烽�夋嫨璐熻矗浜�"> + <el-select v-model="form.userId" style="width: 100%" filterable placeholder="璇烽�夋嫨璐熻矗浜�"> <el-option v-for="item in userList" :key="item.userId" @@ -125,7 +122,7 @@ <el-input v-model="form.teamMembers" type="textarea" rows="4" maxlength="64" show-word-limit placeholder="璇疯緭鍏ュ洟闃熸垚鍛�" /> </el-form-item> <el-form-item label="澶囨敞" prop="remarks"> - <el-input v-model="form.remarks" type="textarea" rows="6" maxlength="512" show-word-limit placeholder="璇疯緭鍏ュ唴瀹�" /> + <el-input v-model="form.remarks" type="textarea" rows="10" maxlength="512" show-word-limit placeholder="璇疯緭鍏ュ唴瀹�" /> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> @@ -275,8 +272,9 @@ const id = row.id || this.ids getConstructionBatch(id).then(response => { this.loading = false; - this.form = response.data; - this.form.date = [this.form.startDate, this.form.endDate] + // this.form = response.data; + const localDate = [response.data.startDate, response.data.endDate]; + this.form = Object.assign({}, response.data, {date: localDate}) this.open = true; this.title = "淇敼鏂藉伐鎵规"; }); @@ -284,7 +282,6 @@ /** 鎻愪氦鎸夐挳 */ submitForm() { this.$refs["form"].validate(valid => { - console.log(this.form.date) this.form.startDate = this.form.date[0]; this.form.endDate = this.form.date[1]; if (valid) { -- Gitblit v1.9.1