From c679af2a31ba7c006c5b9a6cb5d7a79050f0703f Mon Sep 17 00:00:00 2001
From: wente <329538422@qq.com>
Date: 星期三, 22 十一月 2023 08:48:01 +0800
Subject: [PATCH] 项目表
---
web/packages/components/zt-dict/src/zt-dict.vue | 36 ++++++++++++++++++++++++++++++------
1 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/web/packages/components/zt-dict/src/zt-dict.vue b/web/packages/components/zt-dict/src/zt-dict.vue
index fc05eee..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) { // 瀛楀吀绫诲瀷
@@ -110,12 +126,20 @@
}
.el-radio__input.is-disabled.is-checked + .el-radio__label {
- color: #808080 !important;
+ color: #00a06e !important;
}
.el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #00a06e !important;
- border-color: #808080 !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