From 8e2a3bde018d84c7316d78939b022a93841ff5b9 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 04 九月 2024 01:35:20 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/system/point/index.vue |   40 ++++++++++++++++++++++++----------------
 1 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/src/views/system/point/index.vue b/src/views/system/point/index.vue
index bfd3e73..9369274 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"
@@ -71,11 +80,7 @@
               <div class="el-upload__tip" slot="tip">鍙兘涓婁紶xls/xlsx鏂囦欢</div>
             </el-upload>
           </div>
-          <div>
-            <el-button class="bottom_" type="primary" size="small" v-loading="upload" @click="handleImport"
-                       v-hasPermi="['point:import']">瀵煎叆</el-button>
-          </div>
-          <el-button type="primary" size="mini" plain icon="el-icon-top" slot="reference">瀵煎叆鐐逛綅</el-button>
+          <el-button type="primary" size="mini" plain icon="el-icon-top" slot="reference" v-hasPermi="['point:import']">瀵煎叆鐐逛綅</el-button>
         </el-popover>
       </el-col>
 <!--      <el-col :span="1.5">-->
@@ -94,9 +99,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 +240,7 @@
   dicts: ['point_tag'],
   data() {
     return {
+      needUpdateUnit: false,
       importantTag: false,
       provinceTag: false,
       importantCommandImageTag: false,
@@ -323,12 +329,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 +366,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 +545,7 @@
 <style scoped>
 .bottom_ {
   width: 100%;
-  margin-bottom: 5px;
+  margin-bottom: 8px;
 }
 .col-item {
   margin: 5px 0;

--
Gitblit v1.8.0