From 906df84cc340d514b8890527e52ac23170a022ca Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期三, 22 十一月 2023 08:50:12 +0800
Subject: [PATCH] Changes

---
 web/packages/components/zt-dict/src/zt-dict.vue |   47 +++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/web/packages/components/zt-dict/src/zt-dict.vue b/web/packages/components/zt-dict/src/zt-dict.vue
index f1ea43a..ec780f7 100644
--- a/web/packages/components/zt-dict/src/zt-dict.vue
+++ b/web/packages/components/zt-dict/src/zt-dict.vue
@@ -3,9 +3,12 @@
       <el-select :value="dictValue" @change="changeProjectMajor" @input="$emit('input', $event)" :placeholder="placeholder" clearable style="width: 100%;" v-if="showType === 'select'" :disabled="disabled">
           <el-option :label="data.dictLabel" v-for="data in dicts" :key="data.dictValue" :value ="data.dictValue">{{data.dictLabel}}</el-option>
       </el-select>
-      <el-radio-group :value="dictValue" @input="$emit('input', $event)" v-if="showType === 'radio'" :disabled="disabled">
-        <el-radio :label="data.dictValue" v-for="data in dicts" :key="data.dictValue">{{data.dictLabel}}</el-radio>
-      </el-radio-group>
+      <div v-if="showType === 'radio'" :disabled="disabled">
+        <el-radio-group :value="dictValue" @input="$emit('input', $event)" >
+          <el-radio :label="data.dictValue" @change="changeDictValue(data.dictValue,data.dictLabel)" v-for="data in dicts" :key="data.dictValue">{{data.dictLabel}}</el-radio>
+          <el-input class="radio-input" v-if="isName" v-model="inputName"></el-input>
+        </el-radio-group>
+      </div>
       <zt-combo-tree v-model="dictValue" :datas="dictTrees" :disabled-filter="disabledFilter" @input="$emit('input', $event)" v-if="showType === 'tree'" :placeholder="placeholder"/>
     </div>
 </template>
@@ -15,6 +18,7 @@
   export default {
     name: 'ZtDict',
     props: {
+      inputName:{},
       value: [Number, String, Boolean],
       dict: { // 瀛楀吀绫诲瀷
         type: String,
@@ -42,7 +46,9 @@
     },
     data() {
       return {
-        dictValue: typeof this.value === 'undefined' ? '' : (this.value + '')
+        dictValue: typeof this.value === 'undefined' ? '' : (this.value + ''),
+        isName:false,
+        eventIndex:'',
       }
     },
     computed: {
@@ -75,6 +81,16 @@
       }
     },
     methods: {
+      changeDictValue(value,name){
+        if(name.indexOf("鍏朵粬")!=-1){
+          console.log(this.inputName,'inputName')
+          console.log(name,'瀛楀吀鍚嶅瓧q34567')
+          this.eventIndex = value
+          this.isName = true
+        }else {
+          this.isName = false
+        }
+      },
       wrapTreeId(dictTypes) {
         dictTypes.forEach(item => {
           if ((item.dictType || '').length > 0) { // 瀛楀吀绫诲瀷
@@ -104,3 +120,26 @@
     }
   }
 </script>
+<style>
+  .el-radio__input.is-disabled + .el-radio__label {
+    color: #808080 !important;
+  }
+
+  .el-radio__input.is-disabled.is-checked + .el-radio__label {
+    color: #00a06e !important;
+  }
+
+  .el-radio__input.is-disabled.is-checked .el-radio__inner {
+    background-color: #00a06e !important;
+    border-color: #1890ff !important;
+  }
+  .radio-input.el-input{
+    position: absolute;
+    bottom: 5px;
+    left: 68px;
+  }
+  .radio-input.el-input>.el-input__inner{
+    height: 25px;
+  }
+</style>
+

--
Gitblit v1.9.1