mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-04 04:08:43 +08:00 
			
		
		
		
	v3.6.0 增加字典标签样式回显
This commit is contained in:
		@@ -108,7 +108,7 @@ import { listData, getData, delData, addData, updateData, exportData } from "@/a
 | 
			
		||||
import { listAllSimple, getType } from "@/api/system/dict/type";
 | 
			
		||||
 | 
			
		||||
import { CommonStatusEnum } from '@/utils/constants'
 | 
			
		||||
import { getDictDataLabel, getDictDatas, DICT_TYPE } from '@/utils/dict'
 | 
			
		||||
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  name: "Data",
 | 
			
		||||
 
 | 
			
		||||
@@ -44,7 +44,11 @@
 | 
			
		||||
          </router-link>
 | 
			
		||||
        </template>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
      <el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
 | 
			
		||||
      <el-table-column label="状态" align="center" prop="status">
 | 
			
		||||
        <template slot-scope="scope">
 | 
			
		||||
          <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/>
 | 
			
		||||
        </template>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
      <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
 | 
			
		||||
      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
 | 
			
		||||
        <template slot-scope="scope">
 | 
			
		||||
@@ -94,7 +98,7 @@
 | 
			
		||||
import { listType, getType, delType, addType, updateType, exportType } from "@/api/system/dict/type";
 | 
			
		||||
 | 
			
		||||
import { CommonStatusEnum } from '@/utils/constants'
 | 
			
		||||
import { getDictDataLabel, getDictDatas, DICT_TYPE } from '@/utils/dict'
 | 
			
		||||
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  name: "Dict",
 | 
			
		||||
@@ -161,10 +165,6 @@ export default {
 | 
			
		||||
        this.loading = false;
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // 字典状态字典翻译
 | 
			
		||||
    statusFormat(row, column) {
 | 
			
		||||
      return getDictDataLabel(DICT_TYPE.COMMON_STATUS, row.status)
 | 
			
		||||
    },
 | 
			
		||||
    // 取消按钮
 | 
			
		||||
    cancel() {
 | 
			
		||||
      this.open = false;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user