add techBox & fix bugs 0720
This commit is contained in:
		@@ -2,13 +2,15 @@ import TableOperaionComponent from "@/components/noTemplateComponents/operationC
 | 
			
		||||
import TableTextComponent from "@/components/noTemplateComponents/detailComponent";
 | 
			
		||||
import { timeFilter, dictFilter } from "@/utils/filters";
 | 
			
		||||
// import switchBtn from "@/components/noTemplateComponents/switchBtn";
 | 
			
		||||
import techBox from "@/components/noTemplateComponents/techBox";
 | 
			
		||||
 | 
			
		||||
export default function () {
 | 
			
		||||
  const tableProps = [
 | 
			
		||||
    { type: "index", label: "序号" },
 | 
			
		||||
    { prop: "code", label: "配方号" },
 | 
			
		||||
    { prop: "name", label: "牌号" },
 | 
			
		||||
    { prop: "createTime", label: "添加时间", filter: timeFilter },
 | 
			
		||||
    { prop: "syncTime", label: "同步时间", filter: timeFilter },
 | 
			
		||||
    { prop: "techCode", label: "烧制曲线", subcomponent: techBox },
 | 
			
		||||
    // { prop: "externalCode", label: "版本号" },
 | 
			
		||||
    // { prop: "specifications", label: "程序号" },
 | 
			
		||||
    // { prop: "unitDictValue", label: "砖型", filter: dictFilter("unit") },
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,8 @@ import TableOperaionComponent from "@/components/noTemplateComponents/operationC
 | 
			
		||||
import TableTextComponent from "@/components/noTemplateComponents/detailComponent";
 | 
			
		||||
import request from "@/utils/request";
 | 
			
		||||
import { timeFilter, dictFilter } from "@/utils/filters";
 | 
			
		||||
import { getDictDataList } from '@/utils'
 | 
			
		||||
import { getDictDataList } from "@/utils";
 | 
			
		||||
import techBox from "@/components/noTemplateComponents/techBox";
 | 
			
		||||
 | 
			
		||||
export default function () {
 | 
			
		||||
  const tableProps = [
 | 
			
		||||
@@ -10,19 +11,30 @@ export default function () {
 | 
			
		||||
    { prop: "name", label: "砖型名称" },
 | 
			
		||||
    { prop: "code", label: "砖型编码" },
 | 
			
		||||
    { prop: "externalCode", label: "砖型ID" },
 | 
			
		||||
    { prop: "line", label: "中心线颜色", filter: dictFilter('line') },
 | 
			
		||||
    { prop: "line", label: "中心线颜色", filter: dictFilter("line") },
 | 
			
		||||
    { prop: "tequipmentTechCode1", label: "压制工艺", subcomponent: techBox },
 | 
			
		||||
    { prop: "tequipmentTechCode2", label: "检测工艺", subcomponent: techBox },
 | 
			
		||||
    { prop: "description", label: "长描述" },
 | 
			
		||||
    { prop: "shortDesc", label: "短描述" },
 | 
			
		||||
    { prop: "remark", label: "备注" },
 | 
			
		||||
    { prop: "toggle-attachment-dialog", label: "查看附件", actionName: 'toggle-attachment-dialog', buttonContent: '查看附件', subcomponent: TableTextComponent },
 | 
			
		||||
    { prop: "createTime", label: "添加时间", filter: timeFilter },
 | 
			
		||||
    {
 | 
			
		||||
      prop: "toggle-attachment-dialog",
 | 
			
		||||
      label: "查看附件",
 | 
			
		||||
      actionName: "toggle-attachment-dialog",
 | 
			
		||||
      buttonContent: "查看附件",
 | 
			
		||||
      subcomponent: TableTextComponent,
 | 
			
		||||
    },
 | 
			
		||||
    // { prop: "createTime", label: "添加时间", filter: timeFilter },
 | 
			
		||||
    {
 | 
			
		||||
      prop: "operations",
 | 
			
		||||
      name: "操作",
 | 
			
		||||
      fixed: "right",
 | 
			
		||||
      width: 90,
 | 
			
		||||
      subcomponent: TableOperaionComponent,
 | 
			
		||||
      options: [{ name: "edit", label: "编辑", icon: "edit-outline" }, { name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "pms:shape:delete" }],
 | 
			
		||||
      options: [
 | 
			
		||||
        { name: "edit", label: "编辑", icon: "edit-outline" },
 | 
			
		||||
        { name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "pms:shape:delete" },
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
@@ -104,7 +116,7 @@ export default function () {
 | 
			
		||||
            input: true,
 | 
			
		||||
            label: "砖型ID",
 | 
			
		||||
            prop: "externalCode",
 | 
			
		||||
            rules: [{ type: 'number', trigger: "blur", message: "请输入数字类型", transform: val => Number(val) }],
 | 
			
		||||
            rules: [{ type: "number", trigger: "blur", message: "请输入数字类型", transform: (val) => Number(val) }],
 | 
			
		||||
            elparams: { placeholder: "外部编码" },
 | 
			
		||||
          },
 | 
			
		||||
          { input: true, label: "短描述", prop: "shortDesc", elparams: { placeholder: "短描述" } },
 | 
			
		||||
@@ -114,16 +126,16 @@ export default function () {
 | 
			
		||||
            select: true,
 | 
			
		||||
            label: "中心线颜色",
 | 
			
		||||
            prop: "line",
 | 
			
		||||
            options: getDictDataList('line').map(_ => ({ label: _.dictLabel, value: _.dictValue })),
 | 
			
		||||
            options: getDictDataList("line").map((_) => ({ label: _.dictLabel, value: _.dictValue })),
 | 
			
		||||
            rules: { required: true, message: "必填项不能为空", trigger: "change" },
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            upload: true,
 | 
			
		||||
            actionUrl: window.SITE_CONFIG['apiURL'] + '/pms/attachment/uploadFileFormData?typeCode=shape',
 | 
			
		||||
            actionUrl: window.SITE_CONFIG["apiURL"] + "/pms/attachment/uploadFileFormData?typeCode=shape",
 | 
			
		||||
            label: "上传资料",
 | 
			
		||||
            prop: "files",
 | 
			
		||||
            elparams: null
 | 
			
		||||
          }
 | 
			
		||||
            elparams: null,
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
        [{ textarea: true, label: "描述", prop: "description", elparams: { placeholder: "描述" } }],
 | 
			
		||||
        [{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user