大件运输联网系统前端代码
guoshilong
2023-01-02 29bf5936bf1da2eea81f3abe07dc738f5267c42c
src/const/applicationDelay/applicationDelay.js
@@ -1,3 +1,8 @@
const labelWidth = '20%'
import store from "@/store";
const user = store.getters.userInfo
const userId = user.user_id
export default {
  height:'auto',
  calcHeight: 30,
@@ -6,9 +11,11 @@
  searchMenuSpan: 6,
  border: true,
  index: true,
  addBtn:false,
  viewBtn: true,
  selection: true,
  dialogClickModal: false,
  menu:false,
  column: [
    {
      label: "主键",
@@ -18,88 +25,248 @@
      editDisplay: false,
      viewDisplay: false,
      hide: true,
      display:false,
    },
    {
      label: "申请表主键",
      prop: "application",
      label: "申请编号",
      labelWidth:'10%',
      prop: "no",
      span:24,
      type: "select",
      dicUrl: "/api/application/application/getAll?status=10&&passStatus=1&&userId="+userId,
      props:{
        label:"no",
        value:"no"
      },
      typeformat(item, label) {
        return `${item[label]}`
      },
      rules: [{required: true, trigger: ['blur','change'],message:'请输入申请编号'}]
    },
    // {
    //   label: "通行开始时间",
    //   labelWidth:labelWidth,
    //   prop: "delayStartTime",
    //   type: "date",
    //   format:'yyyy-MM-dd',
    //   valueFormat:'yyyy-MM-dd',
    //   disabled:false,
    // },
    // {
    //   label: "通行结束时间",
    //   labelWidth:labelWidth,
    //   prop: "delayEndTime",
    //   type: "date",
    //   format:'yyyy-MM-dd',
    //   valueFormat:'yyyy-MM-dd',
    //   disabled:false,
    // },
    {
      label: "通行时间段",
      prop: "passTime",
      type: "daterange",
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      labelWidth:labelWidth,
      width:170,
      disabled:false,
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() < Date.now();
        },
      },
      rules: [{required: true, trigger: ['blur','change'],message:'请输入通行时间段'}]
    },
    {
      label: "起运机构",
      prop: "transportDept",
      type: "input",
      labelWidth:labelWidth,
      disabled:false,
    },
    {
      label: "延期时间",
      prop: "delayTime",
      label: "途径省份",
      prop: "passProvince",
      type: "input",
      labelWidth:labelWidth,
      disabled:false,
    },
    {
      label: "租户id",
      prop: "tenantId",
      label: "出发地",
      prop: "departure",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
      labelWidth:labelWidth,
      disabled:false,
    },
    {
      label: "创建人",
      prop: "createUser",
      label: "目的地",
      prop: "destination",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
      labelWidth:labelWidth,
      disabled:false,
    },
    {
      label: "创建部门",
      prop: "createDept",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
      label: "通行路线",
      prop: "pathway",
      type: "textarea",
      minRows:2,
      labelWidth:labelWidth,
      disabled:false,
    },
    {
      label: "创建时间",
      prop: "createTime",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
      label: "通行桥涵",
      prop: "passBridge",
      type: "textarea",
      minRows:2,
      labelWidth:labelWidth,
      disabled:false,
    },
    {
      label: "修改人",
      prop: "updateUser",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
      label: "延期原因",
      span: 12,
      row:true,
      labelWidth:labelWidth,
      prop: "reason",
      type: "select",
      dicUrl: "/api/blade-system/dict-biz/dictionary?code=delay_reason",
      props:{
        label:"dictValue",
        value:"dictKey"
      }
    },
    {
      label: "修改时间",
      prop: "updateTime",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
      label: "备注",
      labelWidth:labelWidth,
      prop: "remark",
      type: "textarea",
      minRows:2,
      hide: true
    },
    {
      label: "状态",
      label: "办理进度",
      prop: "status",
      type: "input",
      type: "select",
      props: {
        label: "dictValue",
        value: "dictKey"
      },
      dicUrl:'/api/blade-system/dict-biz/dictionary?code=application_status',
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
      display:false,
    },
  ]
}
export const detailOption = {
  height:'auto',
  calcHeight: 30,
  tip: false,
  submitBtn:false,
  emptyBtn:false,
  border: true,
  index: true,
  selection: true,
  dialogClickModal: false,
  detail:true,
  column: [
    {
      label: "申请编号",
      labelWidth:'10%',
      prop: "no",
      span:24,
      type: "select",
      disabled:true,
      dicUrl: "/api/application/application/getAll?status=10",
      props:{
        label:"no",
        value:"no"
      },
    },
    {
      label: "是否已删除",
      prop: "isDeleted",
      label: "通行开始时间",
      labelWidth:labelWidth,
      prop: "delayStartTime",
      type: "date",
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      disabled:true,
    },
    {
      label: "通行结束时间",
      labelWidth:labelWidth,
      prop: "delayEndTime",
      type: "date",
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      disabled:true,
    },
    {
      label: "起运机构",
      prop: "transportDept",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
      labelWidth:labelWidth,
      disabled:true,
    },
    {
      label: "途径省份",
      prop: "passProvince",
      type: "input",
      labelWidth:labelWidth,
      disabled:true,
    },
    {
      label: "出发地",
      prop: "departure",
      type: "input",
      labelWidth:labelWidth,
      disabled:true,
    },
    {
      label: "目的地",
      prop: "destination",
      type: "input",
      labelWidth:labelWidth,
      disabled:true,
    },
    {
      label: "通行路线",
      prop: "pathway",
      type: "textarea",
      minRows:2,
      labelWidth:labelWidth,
      disabled:true,
    },
    {
      label: "通行桥涵",
      prop: "passBridge",
      type: "textarea",
      minRows:2,
      labelWidth:labelWidth,
      disabled:true,
    },
    {
      label: "延期原因",
      span: 12,
      row:true,
      labelWidth:labelWidth,
      prop: "reason",
      type: "select",
      dicUrl: "/api/blade-system/dict-biz/dictionary?code=delay_reason",
      props:{
        label:"dictValue",
        value:"dictKey"
      },
      disabled:true,
    },
    {
      label: "备注",
      labelWidth:labelWidth,
      prop: "remark",
      type: "textarea",
      minRows:2,
      disabled:true,
    },
  ]
}