<template>
  <div class="ele-body baseinfo-container">
    <el-card shadow="never">
      <div class="page-title">
        <el-page-header @back="$router.go(-1)">
          <div slot="content" class="pageContent">
            <div>{{ title }}</div>
          </div>
        </el-page-header>
        <div>
          <el-button type="primary" @click="submit" :loading="btnLoading"
            >确定</el-button
          >
        </div>
      </div>
      <el-form
        label-width="120px"
        :model="{ ...form, ...positionInfo }"
        ref="form"
        :rules="rules"
      >
        <div class="content">
          <div class="basic-details-title border-none">
            <span class="border-span">基本信息</span>
          </div>
          <el-descriptions title="" :column="4" size="medium" border>
            <template slot="title" v-if="pageType == 'add'">
              <el-form-item class="label-none" label-width="0">
                <span style="color: red; padding-right: 5px">*</span>
                <el-button type="primary" plain @click="handlwpbm"
                  >选择物品编码</el-button
                >
              </el-form-item>
            </template>
            <el-descriptions-item>
              <template slot="label"> 设备编码 </template>
              <el-form-item
                prop="code"
                label-width="0"
                v-if="pageType == 'add'"
              >
                <el-input
                  v-if="basicInfo"
                  class="input"
                  v-model="form.code"
                ></el-input>
              </el-form-item>
              <span v-if="pageType == 'edit'">{{ form.code }}</span>
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label"> 设备名称 </template>
              <el-form-item
                prop="name"
                label-width="0"
                v-if="pageType == 'add'"
              >
                <el-input
                  v-if="basicInfo"
                  class="input"
                  v-model="form.name"
                ></el-input>
              </el-form-item>
              <span v-if="pageType == 'edit'">{{ form.name }}</span>
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label"> 型号</template>
              {{ basicInfo.modelType }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label"> 规格 </template>
              {{ basicInfo.specification }}
            </el-descriptions-item>
            <el-descriptions-item :span="2">
              <template slot="label"> 分类 </template>
              {{ basicInfo.categoryLevelPath }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label"> 生产日期 </template>
              <el-form-item
                prop="productTime"
                label-width="0"
                v-if="pageType == 'add'"
              >
                <el-date-picker
                  v-if="basicInfo"
                  v-model="form.productTime"
                  type="datetime"
                  placeholder="选择日期时间"
                  value-format="yyyy-MM-dd HH:mm:ss"
                >
                </el-date-picker>
              </el-form-item>
              <span v-if="pageType == 'edit'">{{ form.productTime }}</span>
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label"> 过保日期 </template>
              <span v-if="pageType == 'add'">{{ expirationTime }}</span>
              <span v-if="pageType == 'edit'">{{ cbexpirationTime }}</span>
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label"> 计量单位 </template>
              {{ basicInfo.measuringUnit }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label"> 标准产能 </template>
              {{ setbzcn(basicInfo.extendField) }}
            </el-descriptions-item>
            <!-- <el-descriptions-item v-if="pageType == 'edit'">
            <template slot="label"> 实际产能 </template>
            {{ basicInfo.measuringUnit }}
          </el-descriptions-item> -->
            <el-descriptions-item v-if="pageType == 'edit'">
              <template slot="label"> 生命周期</template>
              {{ sourceDICT }}
            </el-descriptions-item>
            <el-descriptions-item v-if="pageType == 'edit'">
              <template slot="label"> 网络状态</template>
              {{ networkStatus == 1 ? '在线' : '离线' }}
            </el-descriptions-item>
          </el-descriptions>

          <div class="basic-details-title border-none">
            <span class="border-span">资产信息</span>
          </div>
          <el-row>
            <el-col :span="8">
              <el-form-item label="固资编码">
                <el-input class="input" v-model="zcInfo.fixCode"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="颜色">
                <el-input class="input" v-model="zcInfo.color"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="重量">
                <el-input class="input" v-model="zcInfo.weight"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="维护部门">
                <div class="input">
                  <DeptSelect v-model="zcInfo.repairGroupId" @input="getwhbm" />
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="维护人">
                <el-select v-model="zcInfo.repairUserId" placeholder="请选择">
                  <el-option
                    v-for="item in options.repairUserId"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="权属部门">
                <div class="input">
                  <DeptSelect
                    v-model="zcInfo.ownershipGroupId"
                    @input="getqsbm"
                  />
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="权属人">
                <el-select
                  v-model="zcInfo.ownershipUserId"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in options.ownershipUserId"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="设备用途">
                <el-input v-model="zcInfo.purpose" class="input"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="所属工序">
                <!-- {{ '成型工序' }} -->
                <WorkingProcedureSelect
                  v-model="zcInfo.roteId"
                ></WorkingProcedureSelect>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="品牌">
                <el-select v-model="zcInfo.brand" placeholder="请选择">
                  <el-option
                    v-for="item in options.brand"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="供应商">
                <el-select v-model="zcInfo.supplierId" placeholder="请选择">
                  <el-option
                    v-for="item in options.supplierId"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="所属厂房">
                <FactoryAreaSelect v-model="zcInfo.factoryPlantCode" />
                <!-- <el-select
                  v-model="zcInfo.factoryPlantCode"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in options.factoryPlantCode"
                    :key="item.code"
                    :label="item.name"
                    :value="item.code"
                  >
                  </el-option>
                </el-select> -->
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="设备位置" required>
                <div class="sbwz">
                  <el-row :gutter="12">
                    <el-col :span="3">
                      <el-form-item
                        label=""
                        label-width="0"
                        prop="factoryCode"
                        :rules="[
                          {
                            required: true,
                            message: '请选择工厂',
                            trigger: 'change'
                          }
                        ]"
                        ><factorySelect
                          v-model="positionInfo.factoryCode"
                          placeholder="请选择工厂"
                          @selfChange="hanldFactoryCode"
                        /> </el-form-item
                    ></el-col>
                    <el-col :span="3">
                      <el-form-item
                        label=""
                        label-width="0"
                        prop="workshopCode"
                        :rules="[
                          {
                            required: true,
                            message: '请选择车间',
                            trigger: 'change'
                          }
                        ]"
                      >
                        <WorkshopSelect
                          ref="WorkshopSelectRef"
                          :factoryId="positionInfo.factoryCode"
                          v-model="positionInfo.workshopCode"
                          @selfChange="hanldWorkshopCode"
                          placeholder="请选择车间" /></el-form-item
                    ></el-col>
                    <el-col :span="3">
                      <el-form-item
                        label=""
                        label-width="0"
                        prop="lineCode"
                        :rules="[
                          {
                            required: true,
                            message: '请选择产线',
                            trigger: 'change'
                          }
                        ]"
                      >
                        <FactoryLineSelect
                          ref="FactoryLineSelectRef"
                          :workshopId="positionInfo.workshopCode"
                          v-model="positionInfo.lineCode"
                          @selfChange="hanldlineCodeCode"
                          placeholder="请选择产线"
                        /> </el-form-item
                    ></el-col>
                    <el-col :span="4">
                      <el-input
                        class="item item-input"
                        placeholder="详细地址"
                        v-model="positionInfo.detailPosition"
                      ></el-input
                    ></el-col>
                  </el-row>
                </div>
              </el-form-item>
            </el-col>
          </el-row>
          <div class="basic-details-title border-none">
            <span class="border-span">文档信息</span>
          </div>
          <div class="upload-container">
            <WithView v-model="imageUrl" :limit="1" />
            <div class="file-list">
              <div>
                <el-form-item prop="image" label="使用说明书">
                  <fileUpload
                    v-model="attUrl.operatingManual.value"
                    module="main"
                    :showLib="true"
                  />
                </el-form-item>
              </div>
              <div>
                <el-form-item prop="image" label="生产许可证书">
                  <fileUpload
                    v-model="attUrl.productionLicence.value"
                    module="main"
                    :showLib="true"
                  />
                </el-form-item>
              </div>
              <div>
                <el-form-item prop="image" label="防爆合格证书">
                  <fileUpload
                    v-model="attUrl.explosionProofCertificate.value"
                    module="main"
                    :showLib="true"
                  />
                </el-form-item>
              </div>
              <div>
                <el-form-item prop="image" label="检验报告">
                  <fileUpload
                    v-model="attUrl.surveyReport.value"
                    module="main"
                    :showLib="true"
                  />
                </el-form-item>
              </div>
              <div>
                <el-form-item prop="image" label="检验周期说明">
                  <fileUpload
                    v-model="attUrl.inspectionCycleManual.value"
                    module="main"
                    :showLib="true"
                  />
                </el-form-item>
              </div>
              <div>
                <el-form-item prop="image" label="图纸资料">
                  <fileUpload
                    v-model="attUrl.informationDrawing.value"
                    module="main"
                    :showLib="true"
                  />
                </el-form-item>
              </div>
              <div>
                <el-form-item prop="image" label="产品合格证">
                  <fileUpload
                    v-model="attUrl.productCertificate.value"
                    module="main"
                    :showLib="true"
                  />
                </el-form-item>
              </div>
            </div>
          </div>
          <div class="basic-details-title border-none">
            <span class="border-span">物联参数</span>
          </div>
          <el-row>
            <el-col>
              <el-form-item label="是否启用物联">
                <el-switch
                  v-model="isIotEnable"
                  active-text="开"
                  inactive-text="关"
                  :active-value="1"
                  :inactive-value="0"
                >
                </el-switch>
              </el-form-item>
            </el-col>
            <el-col>
              <el-form-item label="物联ID">{{ iotId }}</el-form-item>
            </el-col>
          </el-row>
          <div class="basic-details-title border-none">
            <span class="border-span">扩展信息</span>
          </div>
          <div class="kzzd">
            <el-row>
              <el-col
                :span="24"
                v-for="(item, index) in form.extInfoSelf"
                :key="index"
                style="margin-bottom: 20px"
              >
                <el-form-item
                  label-width="0"
                  :prop="'extInfoSelf.' + index + '.key'"
                  :rules="{
                    required: true,
                    message: '自定义参数名称不能为空',
                    trigger: 'blur'
                  }"
                >
                  <div class="add-col">
                    <el-input
                      class="col-input"
                      v-model="item.key"
                      placeholder="参数名称"
                    ></el-input>
                    <el-input
                      class="col-input"
                      v-model="item.value"
                      placeholder="参数值"
                    ></el-input>
                    <el-button
                      class="del"
                      type="text"
                      @click="delt(item, index)"
                    >
                      删除
                    </el-button>
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="24" v-if="form.extInfoSelf.length < 10">
                <el-form-item label-width="0">
                  <el-button
                    class="primarybutton"
                    type="primary"
                    @click="addItem"
                    >增加自定义参数</el-button
                  >
                </el-form-item>
              </el-col>
            </el-row>
          </div>
        </div>
      </el-form>
      <DialogGoods
        ref="DialogGoods"
        @succeed="cbDialogGoods"
        width="1200px"
      ></DialogGoods>
    </el-card>
  </div>
</template>

<script>
  import DeptSelect from '@/components/CommomSelect/dept-select.vue';
  import FactoryLineSelect from '@/components/CommomSelect/factory-line-select.vue';
  import WorkshopSelect from '@/components/CommomSelect/workshop-select.vue';
  import FactoryAreaSelect from '@/components/CommomSelect/factory-area-select.vue';
  import WorkingProcedureSelect from '@/components/CommomSelect/working-procedure-select.vue';
  import factorySelect from '@/components/CommomSelect/factory-select.vue';
  import fileUpload from '@/components/upload/fileUpload';
  import WithView from '@/components/upload/WithView';
  import imgUpload from '@/components/upload/imgUpload';
  // import selectUpload from "@/components/selectUpload";
  // import UploadImg from "@/components/uploadImg/WithView.vue";
  import DialogGoods from './components/DialogGoods';
  // import { parseTime } from "@/utils/ruoyi.js";
  // import org from "@/api/main/org";
  // import user from "@/api/main/user";
  // import selectTree from "@/components/selectTree";
  // import dict from "@/api/main/craft/dict";
  // import { imageView } from "@/utils";
  // import {
  //   getPlants,
  //   getfactoryInfo,
  //   getFactorys,
  //   getProductionLine,
  //   saveOrEdit,
  //   getAssetNum,
  //   getDetail,
  //   getSupplier
  // } from '@/api/ledgerAssets/equipment';
  import { getFactoryarea } from '@/api/factoryModel';
  import { saveOrEdit, getAssetInfo } from '@/api/ledgerAssets';
  import { getUserPage } from '@/api/system/organization';
  export default {
    components: {
      //selectUpload,
      //UploadImg,
      FactoryLineSelect,
      WithView,
      WorkshopSelect,
      FactoryAreaSelect,
      WorkingProcedureSelect,
      fileUpload,
      imgUpload,
      factorySelect,
      DialogGoods,
      DeptSelect
    },
    data () {
      return {
        title: '新建设备信息',
        pageType: 'add',
        btnLoading: false,
        // 设备主键id
        id: '',
        form: {
          extInfoSelf: [],
          // 基本信息
          code: '',
          name: '',
          productTime: ''
        },
        rules: {
          name: [
            { required: true, message: '请输入设备名称', trigger: 'blur' }
          ],
          code: [{ required: true, message: '请输入设备编码', trigger: 'blur' }]
        },
        // 基本信息
        basicInfo: {},
        // 资产信息
        zcInfo: {
          // 	固定资产编码
          fixCode: '',
          // 颜色
          color: '',
          // 重量
          weight: '',
          // 维护部门code
          repairGroupId: '',
          repairDeptName: '',
          repairUserId: '',
          // 权属部门
          ownershipGroupId: '',
          ownershipUserId: '',
          // 设备用途
          purpose: '',
          // 工序
          roteId: '',
          //品牌
          brand: '',
          // 	供应商code
          supplierId: '',
          // 厂房
          factoryPlantCode: '',
          roteCode: ''
        },
        positionInfo: {
          // 详细地址
          detailPosition: '',
          // 请选择产线
          lineCode: '',
          lineName: '',
          // 请选择车间
          workshopCode: '',
          workshopName: '',
          // 请选择工厂
          factoryCode: '',
          factoryName: ''
        },
        // 图片
        imageUrl: null,
        // 文档信息
        attUrl: {
          operatingManual: {
            value: [],
            sort: 1
          },
          productionLicence: {
            value: [],
            sort: 2
          },
          explosionProofCertificate: {
            value: [],
            sort: 3
          },
          surveyReport: {
            value: [],
            sort: 4
          },
          inspectionCycleManual: {
            value: [],
            sort: 5
          },
          informationDrawing: {
            value: [],
            sort: 6
          },
          productCertificate: {
            value: [],
            sort: 7
          }
        },
        // 是否开始物联
        isIotEnable: true,
        // 物联ID
        iotId: '',
        // 回显过保时间
        cbexpirationTime: '',
        // 生命周期
        sourceDICT: '',
        // 网络状态
        networkStatus: '',
        options: {
          deptList: [],
          repairUserId: [],
          ownershipUserId: [],
          supplierId: [],
          brand: []
        }
      };
    },
    watch: {},
    computed: {
      // 过保时间
      expirationTime () {
        if (this.form.productTime && this.basicInfo.expirationDate) {
          return this.setGbTime(
            this.form.productTime,
            this.basicInfo.expirationDate,
            this.basicInfo.expirationDateUnit
          );
        } else {
          return '';
        }
      }
    },
    created () {
      if (this.$route.query.id) {
        this.pageType = 'edit';
        this.id = this.$route.query.id;
        this.getInfo();
        this.title = '编辑设备信息';
      }
    },
    methods: {
      handlwpbm () {
        this.$refs.DialogGoods.open();
      },
      async cbDialogGoods (data) {
        this.basicInfo = data;
        this.form.rootCategoryLevelId = JSON.parse(
          this.basicInfo.categoryLevelPathId || '[]'
        )[0];
        this.form.categoryId = this.basicInfo.id;
        this.form.name = this.basicInfo.name;
        // let res = await getAssetNum({
        //   assetCode: this.basicInfo.code,
        //   num: 1
        // });
        this.form.code = Date.now(); //res.data[0].onlyCode;
      },
      // 计算过保时间
      setGbTime (basic, value, type) {
        basic = Date.parse(basic);
        let time;
        switch (type) {
          case 'minute':
            time = value * 1000 * 60;
            break;
          case 'hour':
            time = value * 1000 * 60 * 60;
            break;
          case 'day':
            time = value * 1000 * 60 * 60 * 24;
            break;
          case 'month':
            time = value * 1000 * 60 * 60 * 24 * 30;
            break;
          case 'year':
            time = value * 1000 * 60 * 60 * 24 * 365;
            break;
          default:
            break;
        }

        let num = basic + time;
        return parseTime(num);
      },
      async getwhbm () {
        if (!this.zcInfo.repairGroupId) return;
        let data = await getUserPage({
          pageNum: 1,
          size: 9999,
          groupId: this.zcInfo.repairGroupId
        });
        this.options.repairUserId = data.list;
      },
      async getqsbm () {
        if (!this.zcInfo.ownershipGroupId) return;
        let data = await getUserPage({
          pageNum: 1,
          size: 9999,
          groupId: this.zcInfo.ownershipGroupId
        });
        this.options.ownershipUserId = data.list;
      },
      // 树形结构数据
      getTreeList () {
        org.tree().then((res) => {
          this.options.deptList = res.data;
        });
      },
      // 获取供应商、工序列表
      async getgys () {
        let muster = await getSupplier({
          size: 999
        });
        this.options.supplierId = muster.data.items; //供应商
      },

      // 添加自定义参数
      addItem () {
        if (this.form.extInfoSelf.length < 10) {
          let item = { key: '', value: '' };
          this.form.extInfoSelf.push(item);
        } else {
          this.$message.warning('自定义参数最多添加10条');
        }
      },
      // 删除自定义参数
      delt (item, index) {
        this.form.extInfoSelf.splice(index, 1);
      },
      // 提交
      submit () {
        if (!this.basicInfo && this.pageType == 'add') {
          return this.$message.error('请选择物品编码');
        }
        this.$refs.form.validate((valid) => {
          if (valid) {
            let par = {
              //基本信息
              ...this.form,
              // id: this.basicInfo.id,
              // assetCode: this.form.code,
              // assetName: this.form.name,
              assetType: 1,
              // informationId: this.basicInfo.id,
              // productTime: this.form.productTime,
              // expirationTime: this.expirationTime,
              // 资产信息
              positionIds: '1,1,1,1',
              ...this.zcInfo,
              position: {
                detailPosition: this.positionInfo.detailPosition,
                pathIds: `${this.positionInfo.factoryCode},${this.positionInfo.workshopCode},${this.positionInfo.lineCode}`,
                pathName: `${this.positionInfo.factoryName},${this.positionInfo.workshopName},${this.positionInfo.lineName}`,
                type: 'PRODUCTION_LINE'
              },
              // 文档信息
              attUrl: this.setWd() || [],
              // // 设备图片
              imageUrl: this.imageUrl || {},
              // 是否启用物联
              isIotEnable: this.isIotEnable
              // // 扩展字段
              // extInfoSelf: this.setKz()
            };
            if (this.pageType == 'edit') {
              par.id = this.id;
            }
            this.btnLoading = true;
            saveOrEdit(par)
              .then((res) => {
                this.$message.success('操作成功');
                this.$router.go(-1);
              })
              .finally(() => {
                this.btnLoading = false;
              });
          } else {
            console.log('error submit!!');
            return false;
          }
        });
      },
      // 处理扩展字段
      setKz () {
        return this.form.extInfoSelf || [];
      },
      // 处理文档信息
      setWd () {
        return Object.values(this.attUrl).map((item) => ({
          ...(item.value[0] || {}),
          sort: item.sort
        }));
      },
      // 获取设备详情
      async getInfo () {
        const data = await getAssetInfo(this.id);
        data.extInfoSelf = data.extInfoSelf || [];

        this.form = data;
        this.basicInfo = data.category;
        this.cbexpirationTime = data.expirationTime;
        this.sourceDICT = data.sourceDICT;
        this.networkStatus = data.networkStatus;
        if (data.positionList?.length) {
          this.positionInfo.detailPosition =
            data.positionList[0].detailPosition;

          const pathIds = data.positionList[0].pathIds.split(',');
          const pathName = data.positionList[0].pathName.split(',');

          this.positionInfo.factoryCode = pathIds[0];
          this.positionInfo.factoryName = pathName[0];

          this.positionInfo.workshopCode = pathIds[1];
          this.positionInfo.workshopName = pathName[1];

          this.positionInfo.lineCode = pathIds[2];
          this.positionInfo.lineName = pathName[2];

          this.$nextTick(() => {
            this.$refs.WorkshopSelectRef.getList();
            this.$refs.FactoryLineSelectRef.getList();
          });
        }
        // 资产信息
        for (const key of Object.keys(this.zcInfo)) {
          this.zcInfo[key] = data[key];
        }
        this.getwhbm();
        this.getqsbm();
        if (data.attUrl && data.attUrl.length > 0) {
          // 文档信息
          Object.keys(this.attUrl).forEach((n, index) => {
            this.attUrl[n].value =
              (data.attUrl[index]?.storePath && [data.attUrl[index]]) || [];
          });
        }

        // 设备图片
        this.imageUrl = data.imageUrl;
        // 物联参数
        this.isIotEnable = data.isIotEnable;
        this.iotId = data.iotId;
      },
      // 设置标准产能
      setbzcn (val) {
        if (!val) {
          return '';
        }
        let item = JSON.parse(val);
        return item.standardCapacity || '';
      },
      hanldFactoryCode (val, item) {
        this.positionInfo.factoryName = item?.name;
        // 重置
        this.zcInfo.workshopCode = '';
        this.zcInfo.lineCode = '';
        this.options.workshopCode = [];
        this.options.lineCode = [];
        // 获取车间
        this.$nextTick(() => {
          this.$refs.WorkshopSelectRef.getList();
        });
      },
      hanldWorkshopCode (val, item) {
        this.positionInfo.workshopName = item?.name;
        // 重置
        this.options.workshopCode = [];
        this.options.lineCode = [];
        // 获取产线
        this.$nextTick(() => {
          this.$refs.FactoryLineSelectRef.getList();
        });
      },
      hanldlineCodeCode (val, item) {
        this.positionInfo.lineName = item?.name;
      }
    }
  };
</script>

<style lang="scss" scoped>
  .baseinfo-container .basic-details-title {
    font-size: 16px;
    margin: 15px 0;
  }
  .upload-container {
    display: flex;
    justify-content: flex-start;
    .file-list {
      margin-left: 50px;
      flex: 1;
    }
  }
  .equipment-container {
    // .content {
    //   padding: 0 20px;
    // }
    .label-none {
      .el-form-item__content {
        margin-left: 0 !important;
      }
    }
  }
  .sbwz {
    .item {
      width: 120px !important;
    }
    .item + .item {
      margin-left: 10px;
    }
    .item-input {
      width: 350px !important;
    }
  }
  .input {
    width: 202px;
  }
  .kzzd {
    width: 500px;
    .add-col {
      display: flex;
      .col-input {
        & + .col-input {
          margin-left: 10px;
        }
      }
      .del {
        margin-left: 10px;
      }
    }
  }
</style>
