From 74ae9d9453e245a3249ecb832a7202c275ad6ece Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期六, 31 八月 2024 19:24:56 +0800
Subject: [PATCH] 点位新增部级标签、点位导入导出优化
---
src/views/system/point/index.vue | 34 +++++++++++++++++++++++-----------
1 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/src/views/system/point/index.vue b/src/views/system/point/index.vue
index bfd3e73..8554d51 100644
--- a/src/views/system/point/index.vue
+++ b/src/views/system/point/index.vue
@@ -34,19 +34,28 @@
</el-col>
<el-col :span="1.5">
<el-popover>
- <p>瀵煎叆鐐逛綅鍙仛鏇存柊鎿嶄綔</p>
<div class="bottom_">
+ <p>瀵煎叆鐐逛綅鍙仛鏇存柊鎿嶄綔</p>
+ </div>
+ <div class="bottom_">
+ <el-switch
+ v-model="needUpdateUnit"
+ active-text="淇敼杩愮淮鍗曚綅/鏃堕棿"
+ inactive-text="涓嶄慨鏀硅繍缁村崟浣�/鏃堕棿">
+ </el-switch>
+ </div>
+ <div class="bottom_" v-show="needUpdateUnit">
<el-select @change="getUnitContractTime" v-model="importUnitId" size="small" placeholder="鏇存崲杩愮淮鍗曚綅">
<el-option v-for="unit in unitList" :key="unit.id" :label="unit.value" :value="unit.id"></el-option>
</el-select>
</div>
- <div class="bottom_">
+ <div class="bottom_" v-show="needUpdateUnit">
<el-select @change="showTimeRange" v-model="contractId" size="small" placeholder="杩愮淮鍚堝悓" :disabled="! importUnitId">
<el-option v-for="(time, index) in timeList" :key="index" :label="time.name" :value="time.id"></el-option>
</el-select>
<span style="margin-left: 10px;color: #8a8989" v-show="importUnitId">璇ュ崟浣嶆湁{{timeList.length}}涓悎鍚�</span>
</div>
- <div class="bottom_">
+ <div class="bottom_" v-show="needUpdateUnit">
<el-date-picker
:disabled="! contractId"
size="small"
@@ -94,9 +103,9 @@
<div>{{ getTagText(scope.row) }}</div>
</template>
</el-table-column>
- <el-table-column label="鐐逛綅寮�濮嬫椂闂�" align="center" prop="startTime" width="140">
+ <el-table-column label="杩愮淮寮�濮嬫椂闂�" align="center" prop="startTime" width="140">
</el-table-column>
- <el-table-column label="鐐逛綅缁撴潫鏃堕棿" align="center" prop="endTime" width="140">
+ <el-table-column label="杩愮淮缁撴潫鏃堕棿" align="center" prop="endTime" width="140">
</el-table-column>
<el-table-column label="杩愮淮鍗曚綅" align="center" prop="unitName" />
<el-table-column label="鐩戠閮ㄩ棬" align="center" prop="deptName" />
@@ -235,6 +244,7 @@
dicts: ['point_tag'],
data() {
return {
+ needUpdateUnit: false,
importantTag: false,
provinceTag: false,
importantCommandImageTag: false,
@@ -323,12 +333,13 @@
let text = '';
// 妫�鏌ユ瘡涓爣绛撅紝濡傛灉涓簍rue锛屽垯娣诲姞鍒皌ext涓�
- if (row.importantTag) text += '閲嶇偣鐐逛綅 ';
- if (row.provinceTag) text += '鐪佸巺鐐逛綅 ';
- if (row.importantCommandImageTag) text += '閲嶇偣鎸囨尌鍥惧儚 ';
-
+ if (row.importantTag) text += '閲嶇偣鐐逛綅銆�';
+ if (row.provinceTag) text += '鐪佸巺鐐逛綅銆�';
+ if (row.importantCommandImageTag) text += '閲嶇偣鎸囨尌鍥惧儚銆�';
+ if (row.deptTag) text += '閮ㄧ骇銆�';
+ text === '' ? '鏅�氱偣浣�' : text
// 杩斿洖鎷兼帴鍚庣殑鏂囨湰鍜屽浐瀹氭枃瀛�
- return text ==='' ? '鏅�氱偣浣�' : text
+ return text.replace(/銆�$/, '')
},
getUnitContractTime(unitId) {
this.ywTimes = []
@@ -359,6 +370,7 @@
formData.append("startTime", this.ywTimes[0] ? this.ywTimes[0] : '')
formData.append("endTime", this.ywTimes[1] ? this.ywTimes[1] : '')
formData.append("unitId", this.importUnitId ? this.importUnitId : -1)
+ formData.append("needUpdateUnit", this.needUpdateUnit)
importData(formData).then(res => {
this.$message.success("瀵煎叆鎴愬姛")
this.upload = false
@@ -537,7 +549,7 @@
<style scoped>
.bottom_ {
width: 100%;
- margin-bottom: 5px;
+ margin-bottom: 8px;
}
.col-item {
margin: 5px 0;
--
Gitblit v1.8.0