Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/master'

ZaiZai 2 anni fa
parent
commit
05e468db66
1 ha cambiato i file con 24 aggiunte e 6 eliminazioni
  1. 24 6
      src/views/system/components/tab-other.vue

+ 24 - 6
src/views/system/components/tab-other.vue

@@ -48,7 +48,7 @@
         <HcDialog bgColor="#ffffff" isToBody  :show="codeModal" :title="codeModalTitle" @close="codeModalClose"  widths="62rem"  @save="saveparentClick">
             <el-form label-position="left" label-width="auto" :model="formcode" :rules="formUserRules" size="large">
                 <el-row :gutter="20">
-                    <el-col :span="24">
+                    <el-col :span="12">
                         <el-form-item label="字典编号:" prop="code">
                             <el-input v-model="formcode.code"/>
                         </el-form-item>
@@ -58,6 +58,11 @@
                             <el-input v-model="formcode.dictName"/>
                         </el-form-item>
                     </el-col>
+                    <el-col :span="12">
+                        <el-form-item label="字典值:"  prop="dictValue">
+                            <el-input v-model="formcode.dictValue"/>
+                        </el-form-item>
+                    </el-col>
           
                     <el-col :span="12">
                         <el-form-item label="字典排序:" prop="sort">
@@ -92,9 +97,9 @@
         <HcDialog bgColor="#ffffff" isToBody  :show="configcodeModal" @close="configcodeModalClose"  widths="62rem" @save="savechilidClick" :title="configcodeModalTitle">
             <el-form label-position="left" label-width="auto" :model="configForm" :rules="formUserRules" size="large">
                 <el-row :gutter="20">
-                    <el-col :span="24">
+                    <el-col :span="12">
                         <el-form-item label="字典编号:" prop="code">
-                            <el-input v-model="configForm.code"/>
+                            <el-input v-model="configForm.code" disabled/>
                         </el-form-item>
                     </el-col>
                     <el-col :span="12">
@@ -102,6 +107,11 @@
                             <el-input v-model="configForm.dictName"/>
                         </el-form-item>
                     </el-col>
+                    <el-col :span="12">
+                        <el-form-item label="字典值:"  prop="dictValue">
+                            <el-input v-model="configForm.dictValue"/>
+                        </el-form-item>
+                    </el-col>
                     <el-col :span="12" v-if="isConfigedit">
                         <el-form-item label="上级字典:"  prop="parentId">
                             <el-select v-model="configForm.parentId" class="m-2" placeholder="请选择" size="large" style="width: 100%;" disabled>
@@ -187,9 +197,6 @@
            
         
             <HcTable :column="configtableColumn" :datas="configtableData" isCheck @selection-change="configtableSelectionChange" :loading="configTableloaing">
-                <template #name="{row}">{{ row['name'] }}</template>
-                <template #text="{row}">{{ row['text'] }}</template>
-                <template #color="{row}">{{ row['color'] }}</template>
                 <template #action="{row, index}">
                     <el-button size="small" type="primary" @click="configeidtModal(row)">编辑</el-button>
                     <el-button size="small" type="primary" @click="configdelClick(row)" :loading="configdelbtnloading">删除</el-button>
@@ -279,6 +286,7 @@ const saveparentClick=async()=>{
     const { error, code, data,msg } = await submitDictionary({
         type:tabsType.value,
         dictName:formcode.value?.dictName,
+        dictValue:formcode.value?.dictValue,
         code:formcode.value?.code,
         id:formcode.value?.id||null,
         sort:formcode.value?.sort||null,
@@ -299,6 +307,7 @@ const savechilidClick=async()=>{
     const { error, code, data,msg } = await submitDictionary({
         type:configItem.value?.type,
         dictName:configForm.value?.dictName,
+        dictValue:configForm.value?.dictValue,
         id:configForm.value?.id||null,
         code:configForm.value?.code,
         parentId:configItem.value.id,
@@ -323,6 +332,8 @@ const batcheditClick=()=>{
 const tableColumn = [
     {key: 'code', name: '字典编号'},
     {key: 'dictName', name: '字典名称'},
+    {key: 'dictValue', name: '字典值'},
+
     {key: 'action', name: '操作', width:250}
 
 ]
@@ -388,6 +399,11 @@ const formUserRules = {
         trigger: "blur",
         message: "请输入字典名称"
     },
+    dictValue:{
+        required: true,
+        trigger: "blur",
+        message: "请输入字典值"
+    },
     sort: {
         required: true,
         trigger: "blur",
@@ -438,6 +454,7 @@ const addchildClick=()=>{
     configcodeModal.value=true;
     configForm.value={}
     configForm.value.parentId=configItem.value.id
+    configForm.value.code=configItem.value.code
     configcodeModalTitle.value='新增'
 
 }
@@ -461,6 +478,7 @@ const configresetClick = () => {
 const configtableColumn = [
     {key: 'code', name: '字典编号'},
     {key: 'dictName', name: '字典名称'},
+    {key: 'dictValue', name: '字典值'},
     {key: 'action', name: '操作', width:250}
 
 ]