From 040225d9771ca5cea7236354c9a287b39542c141 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期四, 07 三月 2024 14:24:11 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/system/point/index.vue | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 52 insertions(+), 5 deletions(-)
diff --git a/src/views/system/point/index.vue b/src/views/system/point/index.vue
index 8f50e49..73ec4a3 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"
@@ -121,7 +121,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 +155,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 +193,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 +260,8 @@
title: "",
// 鏄惁鏄剧ず寮瑰嚭灞�
open: false,
+ // 淇敼寮圭獥
+ editOpen: false,
// 杩愮淮鍗曚綅
unitList: [],
// 杩愮淮鏃跺尯
@@ -313,6 +351,10 @@
this.open = false;
this.reset();
},
+ updateCancel() {
+ this.editOpen = false;
+ this.reset();
+ },
// 琛ㄥ崟閲嶇疆
reset() {
this.form = {
@@ -357,7 +399,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 +412,10 @@
addPointBatch(this.formList).then(response => {
this.$modal.msgSuccess("鏂板鎴愬姛");
this.open = false;
+ // 閲嶇疆
+ this.tempForm = {};
+ this.tempFormList = [];
+ this.formList = [];
this.getList();
});
}
@@ -376,7 +423,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