huang_an 2 سال پیش
والد
کامیت
6e39d22457

+ 48 - 0
anaconda-ks.cfg

@@ -0,0 +1,48 @@
+#version=DEVEL
+# System authorization information
+auth --enableshadow --passalgo=sha512
+# Use CDROM installation media
+cdrom
+# Use graphical install
+graphical
+# Run the Setup Agent on first boot
+firstboot --enable
+
+# Keyboard layouts
+keyboard --vckeymap=cn --xlayouts='cn'
+# System language
+lang zh_CN.UTF-8
+
+# Network information
+network  --bootproto=static --device=ens192 --gateway=192.168.1.1 --ip=192.168.1.251 --nameserver=192.168.1.1 --netmask=255.255.255.0 --ipv6=auto --activate
+network  --hostname=localhost.localdomain
+
+# Root password
+rootpw --iscrypted $6$oSQrtw99lq31j30S$RoT9NSvqkpVstI/UDRiN8ya6N4wiWPSygVn5TP/BQom.s.q/6RTWGTUehcUSe5qn7cMqZuim7kafCTY7dODo60
+# System services
+services --enabled="chronyd"
+# System timezone
+timezone Asia/Shanghai --isUtc
+# System bootloader configuration
+bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
+autopart --type=lvm
+# Partition clearing information
+clearpart --none --initlabel
+
+%packages
+@^minimal
+@core
+chrony
+kexec-tools
+
+%end
+
+%addon com_redhat_kdump --enable --reserve-mb='auto'
+
+%end
+
+%anaconda
+pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
+pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
+pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
+%end

+ 8 - 8
src/views/ledgerAssets/boat/components/boat-list.vue

@@ -29,7 +29,7 @@
           {{ row.code }}
         </el-link>
       </template>
-      <template v-slot:action="{ row }">
+      <!-- <template v-slot:action="{ row }">
         <el-link
           type="primary"
           :underline="false"
@@ -38,7 +38,7 @@
         >
           编辑
         </el-link>
-      </template>
+      </template> -->
     </ele-pro-table>
   </div>
 </template>
@@ -161,13 +161,13 @@
             label: '总数量',
             showOverflowTooltip: true,
             minWidth: 110
-          },
-          {
-            columnKey: 'action',
-            slot: 'action',
-            label: '操作',
-            minWidth: 100
           }
+          // {
+          //   columnKey: 'action',
+          //   slot: 'action',
+          //   label: '操作',
+          //   minWidth: 100
+          // }
         ]
       };
     },

+ 1892 - 0
src/views/ledgerAssets/boat/edit.vue

@@ -0,0 +1,1892 @@
+<template>
+  <div id="equipment_edit" 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>
+              {{ assetInfo.brandNum }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 型号</template>
+              {{ assetInfo.modelType }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 规格 </template>
+              {{ assetInfo.specification }}
+            </el-descriptions-item>
+            <el-descriptions-item :span="2">
+              <template slot="label"> 分类 </template>
+              {{ assetInfo.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 ? '在线' : networkStatus === 0 ? '离线' : ''
+              }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 重量单位 </template>
+              {{ basicInfo.weightUnit }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 包装单位 </template>
+              {{ basicInfo.packingUnit }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 体积 </template>
+              {{ basicInfo.volume ? basicInfo.volume + '/' : null
+              }}{{ basicInfo.volumeUnit }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 毛重 </template>
+              {{ basicInfo.roughWeight }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 净重 </template>
+              {{ basicInfo.netWeight }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 所属部门 </template>
+              {{ basicInfo.groupName }}
+              <!-- <personSelect
+                ref="directorRef"
+                v-model="basicInfo.deptId"
+                :init="false"
+              /> -->
+            </el-descriptions-item>
+          </el-descriptions>
+
+          <div class="basic-details-title border-none">
+            <span class="border-span">资产信息</span>
+          </div>
+          <el-descriptions
+            title=""
+            :column="5"
+            size="medium"
+            border
+            style="edit"
+            :label-style="labelStyle"
+            class="descriptions"
+          >
+            <el-descriptions-item>
+              <template slot="label"> 固资编码 </template>
+              <el-form-item label-width="0">
+                <el-input class="input" v-model="zcInfo.fixCode"></el-input>
+              </el-form-item>
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 编号 </template>
+              <el-form-item label-width="0">
+                <el-input class="input" v-model="zcInfo.codeNumber"></el-input>
+              </el-form-item>
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 颜色 </template>
+              <el-form-item label-width="0">
+                <el-input class="input" v-model="zcInfo.color"></el-input>
+              </el-form-item>
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 级别 </template>
+              <el-form-item label-width="0">
+                <el-select
+                  style="width: 100%"
+                  v-model="zcInfo.level"
+                  placeholder="请选择"
+                >
+                  <el-option
+                    v-for="item in options.assetLevel"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 有效期开始 </template>
+              <el-form-item label-width="0">
+                <el-date-picker
+                  style="width: 100%"
+                  v-model="zcInfo.startTime"
+                  type="month"
+                  value-format="yyyy-MM"
+                  placeholder="选择有效期开始"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 有效期结束 </template>
+              <el-form-item label-width="0">
+                <el-date-picker
+                  style="width: 100%"
+                  v-model="zcInfo.endTime"
+                  @change="endTimeRules"
+                  value-format="yyyy-MM"
+                  type="month"
+                  placeholder="选择有效期结束"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 状态 </template>
+              <el-form-item label-width="0">
+                <el-input
+                  v-model="zcInfo.status"
+                  placeholder="请输入状态"
+                ></el-input>
+              </el-form-item>
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 入账日期 </template>
+              <el-form-item label-width="0">
+                <el-date-picker
+                  style="width: 100%"
+                  v-model="zcInfo.entryDate"
+                  type="date"
+                  placeholder="选择入账日期"
+                  value-format="yyyy-MM-dd"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-descriptions-item>
+
+            <el-descriptions-item>
+              <template slot="label"> 周期 </template>
+              <el-form-item label-width="0">
+                <el-select
+                  style="width: 100%"
+                  v-model="zcInfo.cycle"
+                  placeholder="请选择"
+                >
+                  <el-option
+                    v-for="item in options.deliveryCycle"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-descriptions-item>
+          </el-descriptions>
+          <el-descriptions
+            title=""
+            :column="5"
+            size="medium"
+            border
+            style="edit"
+            :label-style="labelStyle"
+            class="descriptions"
+          >
+            <el-descriptions-item>
+              <template slot="label"> 权属人 </template>
+              <el-form-item label-width="0">
+                <!-- <el-select
+                  style="width: 100%"
+                  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-input
+                  v-model="form.workstation.leaderName"
+                  disabled
+                  placeholder="请输入内容"
+                ></el-input>
+              </el-form-item>
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 权属部门 </template>
+              <el-form-item label-width="0">
+                <div class="input">
+                  <!-- <DeptSelect
+                    v-model="zcInfo.ownershipGroupId"
+                    @input="getqsbm"
+                  /> -->
+                  <el-input
+                    v-model="form.workstation.groupName"
+                    disabled
+                    placeholder="请输入内容"
+                  ></el-input>
+                </div>
+              </el-form-item>
+            </el-descriptions-item>
+            <el-descriptions-item :span="3">
+              <template slot="label"> 所属厂房 </template>
+              <el-form-item label-width="0">
+                <el-input
+                  style="margin-right: 10px; width: 20%"
+                  v-model="form.workstation.workshopPlanName"
+                  disabled
+                  placeholder="请输入内容"
+                ></el-input>
+                <el-input
+                  style="margin-right: 10px; width: 20%"
+                  v-model="form.workstation.workshopName"
+                  disabled
+                  placeholder="请输入内容"
+                ></el-input>
+                <el-input
+                  style="margin-right: 10px; width: 20%"
+                  v-model="form.workstation.productionLineName"
+                  disabled
+                  placeholder="请输入内容"
+                ></el-input>
+                <el-input
+                  style="margin-right: 10px; width: 20%"
+                  v-model="form.workstation.name"
+                  disabled
+                  placeholder="请输入内容"
+                ></el-input>
+                <!-- <FactoryAreaSelect
+                  placeholder="请选择工厂"
+                  style="margin-right: 10px; width: 20%"
+                  v-model="zcInfo.factoryRoomId1"
+                  :augr="1"
+                />
+                <FactoryAreaSelect
+                  placeholder="请选择厂房"
+                  style="margin-right: 10px; width: 20%"
+                  v-model="zcInfo.factoryRoomId2"
+                  :augr="2"
+                  @returnItem="returnItem1"
+                /> -->
+                <!-- <FactoryAreaSelect
+                  placeholder="请选择车间"
+                  style="margin-right: 10px; width: 20%"
+                  v-model="zcInfo.factoryRoomId3"
+                  :augr="3"
+                /> -->
+                <!-- <el-select
+                  style="width: 19%; margin-right: 10px"
+                  v-model="zcInfo.factoryRoomId3"
+                  placeholder="请选择"
+                  @change="getCxList"
+                >
+                  <el-option
+                    v-for="item in zjList"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select> -->
+                <!-- <FactoryAreaSelect
+                  style="margin-right: 10px; width: 20%"
+                  placeholder="请选择产线"
+                  v-model="zcInfo.factoryRoomId4"
+                  :augr="4"
+                /> -->
+                <!-- <el-select
+                  style="width: 19%; margin-right: 10px"
+                  v-model="zcInfo.factoryRoomId4"
+                  placeholder="请选择"
+                >
+                  <el-option
+                    v-for="item in cxList"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+                <FactoryAreaSelect
+                  style="margin-right: 10px; width: 15%"
+                  placeholder="请输入工位"
+                  v-model="zcInfo.factoryRoomId5"
+                  @returnItem="returnItem"
+                /> -->
+              </el-form-item>
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 所属工序 </template>
+              <el-form-item label-width="0">
+                <!-- <WorkingProcedureSelect
+                  v-model="zcInfo.roteId"
+                ></WorkingProcedureSelect> -->
+                <el-input
+                  v-model="form.workstation.taskNames"
+                  disabled
+                  placeholder="请输入内容"
+                ></el-input>
+              </el-form-item>
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 设备位置 </template>
+              <el-form-item label-width="0" prop="location">
+                <div style="display: flex">
+                  <!-- <div
+                    class="location-warp"
+                    style="width: 50%; margin-right: 10px"
+                  >
+                    <el-cascader
+                      clearable
+                      v-model="form.location"
+                      :options="options.cityDataLabel"
+                    ></el-cascader>
+                  </div> -->
+                  <!-- <el-select
+                    filterable
+                    v-model="positionInfo.factoryCode"
+                    style="margin-right: 10px"
+                    clearable
+                  >
+                    <el-option
+                      v-for="(item, index) in warehouseList"
+                      :key="index"
+                      :label="item.name"
+                      :value="item.id"
+                      @click.native="changeWarehouse(item)"
+                    ></el-option>
+                  </el-select> -->
+                  <!-- <factorySelect
+                    style="margin-right: 10px"
+                    v-model="positionInfo.factoryCode"
+                    placeholder="请选择工厂"
+                    @selfChange="hanldFactoryCode"
+                  /> -->
+                  <!-- <el-select
+                    filterable
+                    clearable
+                    v-model="positionInfo.workshopCode"
+                    style="margin-right: 10px"
+                  >
+                    <el-option
+                      v-for="(item, index) in areaList"
+                      :key="index"
+                      :label="item.name"
+                      :value="item.id"
+                      @click.native="twoClick(item)"
+                    ></el-option>
+                  </el-select> -->
+                  <!-- <WorkshopSelect
+                    style="margin-right: 10px"
+                    ref="WorkshopSelectRef"
+                    :factoryId="positionInfo.factoryCode"
+                    v-model="positionInfo.workshopCode"
+                    @selfChange="hanldWorkshopCode"
+                    placeholder="请选择车间"
+                  /> -->
+                  <!-- <FactoryLineSelect
+                    style="margin-right: 10px"
+                    ref="FactoryLineSelectRef"
+                    :workshopId="positionInfo.workshopCode"
+                    v-model="positionInfo.lineCode"
+                    @selfChange="hanldlineCodeCode"
+                    placeholder="请选择产线"
+                  /> -->
+                  <!-- <el-select
+                    clearable
+                    filterable
+                    v-model="positionInfo.lineCode"
+                  >
+                    <el-option
+                      v-for="(item, index) in shelvesList"
+                      :key="index"
+                      :label="item.goodsshelvesCode"
+                      :value="item.id"
+                      @click.native="
+                        positionInfo.lineName = item.goodsshelvesCode
+                      "
+                    ></el-option>
+                  </el-select> -->
+                  <el-cascader
+                    clearable
+                    v-model="form.location"
+                    :options="options.cityDataLabel"
+                  ></el-cascader>
+                  <el-input
+                    style="width: 60%; margin-left: 10px"
+                    placeholder="详细地址"
+                    v-model="positionInfo.detailPosition"
+                  ></el-input>
+                  <!-- <el-input
+                    class="detail"
+                    clearable
+                    :maxlength="20"
+                    v-model="form.locationDetail"
+                    placeholder="请输入详细地址"
+                  /> -->
+                </div>
+              </el-form-item>
+            </el-descriptions-item>
+          </el-descriptions>
+          <el-descriptions
+            title=""
+            :column="5"
+            size="medium"
+            border
+            style="edit"
+            :label-style="labelStyle"
+            class="descriptions"
+          >
+            <el-descriptions-item>
+              <template slot="label"> 维护人 </template>
+              <el-form-item label-width="0">
+                <el-select
+                  style="width: 100%"
+                  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-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 维护部门 </template>
+              <el-form-item label-width="0">
+                <div class="input">
+                  <DeptSelect v-model="zcInfo.repairGroupId" @input="getwhbm" />
+                </div>
+              </el-form-item>
+            </el-descriptions-item>
+          </el-descriptions>
+          <el-descriptions
+            title=""
+            :column="5"
+            size="medium"
+            border
+            style="edit"
+            :label-style="labelStyle"
+            class="descriptions"
+          >
+            <el-descriptions-item>
+              <template slot="label"> 使用岗位 </template>
+              <el-form-item label-width="0">
+                <DeptSelect v-model="zcInfo.postId" @input="auditorDeptClick" />
+              </el-form-item>
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 使用人 </template>
+              <el-form-item label-width="0">
+                <el-select
+                  style="width: 100%"
+                  v-model="zcInfo.usePersonId"
+                  filterable
+                  placeholder="请选择使用人"
+                >
+                  <el-option
+                    v-for="item in userList"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-descriptions-item>
+
+            <el-descriptions-item>
+              <template slot="label"> 负责人 </template>
+              <el-form-item label-width="0">
+                <el-select
+                  style="width: 100%"
+                  v-model="zcInfo.chargePersonId"
+                  filterable
+                  placeholder="请选择负责人"
+                >
+                  <el-option
+                    v-for="item in userList"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-descriptions-item>
+          </el-descriptions>
+          <el-descriptions
+            title=""
+            :column="3"
+            size="medium"
+            border
+            style="edit"
+            :label-style="labelStyle"
+          >
+            <el-descriptions-item>
+              <template slot="label"> 供应商 </template>
+              <el-form-item label-width="0">
+                <el-select
+                  v-model="zcInfo.supplierId"
+                  style="width: 100%"
+                  placeholder="请选择"
+                >
+                  <el-option
+                    v-for="item in suppList"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 品牌 </template>
+              <el-form-item label-width="0">
+                <el-input v-model="zcInfo.brand" class="input"></el-input>
+              </el-form-item>
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 设备用途 </template>
+              <el-form-item label-width="0">
+                <el-input v-model="zcInfo.purpose" class="input"></el-input>
+              </el-form-item>
+            </el-descriptions-item>
+
+            <el-descriptions-item>
+              <template slot="label"> 备注 </template>
+              <el-form-item label-width="0">
+                <el-input
+                  type="textarea"
+                  :rows="2"
+                  placeholder="请输入内容"
+                  v-model="zcInfo.remark"
+                ></el-input>
+              </el-form-item>
+            </el-descriptions-item>
+          </el-descriptions>
+          <div class="basic-details-title border-none">
+            <span class="border-span">仓储配置</span>
+          </div>
+          <el-descriptions title="" :column="4" size="medium" border>
+            <el-descriptions-item>
+              <template slot="label"> 启用库存预警</template>
+              {{ dictType[categoryWms.isWarn] }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">允许拆包</template>
+              {{ dictType[categoryWms.isUnpack] }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">安全库存</template>
+              {{ categoryWms.secureInventory }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">最小库存</template>
+              {{ categoryWms.minInventory }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 最大库存</template>
+              {{ categoryWms.maxInventory }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">盘点模式</template>
+              {{ dictPd[categoryWms.inventoryMode] }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">质保预警参考</template>
+              <!-- <DictSelection
+                dictName="质保预警参考"
+                clearable
+                v-model="categoryWms.warrantyWarnRefer"
+              >
+              </DictSelection> -->
+              {{ categoryWms.warrantyWarnRefer }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">保质期</template>
+              {{
+                categoryWms.warrantyPeriod
+                  ? categoryWms.warrantyPeriod + '/'
+                  : null
+              }}{{ categoryWms.warrantyPeriodUnit }}
+            </el-descriptions-item>
+          </el-descriptions>
+
+          <div class="basic-details-title border-none">
+            <span class="border-span">生产信息</span>
+          </div>
+          <el-descriptions title="" :column="4" size="medium" border>
+            <el-descriptions-item>
+              <template slot="label"> 是否齐套件</template>
+              {{ dictType[categoryMes.isCompleteSet] }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">消耗波动</template>
+              {{ categoryMes.consumWave ? categoryMes.consumWave + '%' : null }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">变动损耗率</template>
+              {{
+                categoryMes.changeLossRate
+                  ? categoryMes.changeLossRate + '%'
+                  : null
+              }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">固定损耗数</template>
+              {{ categoryMes.fixLossNum }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">排程类型</template>
+              {{ categoryMes.apsType }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">允许改型</template>
+              {{ dictType[categoryMes.isModify] }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">允许返工返修</template>
+              {{ dictType[categoryMes.isRework] }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">是否返回料</template>
+              {{ dictType[categoryMes.isRematerial] }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">是否副产品</template>
+              {{ dictType[categoryMes.isByProduct] }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">是否废品</template>
+              {{ dictType[categoryMes.isWaste] }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">是否不良品</template>
+              {{ dictType[categoryMes.isDefective] }}
+            </el-descriptions-item>
+          </el-descriptions>
+
+          <div class="basic-details-title border-none">
+            <span class="border-span">生产信息</span>
+          </div>
+          <el-descriptions title="" :column="4" size="medium" border>
+            <el-descriptions-item>
+              <template slot="label">附件信息</template>
+              {{ categoryObj.fileName }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">备注信息</template>
+              {{ categoryObj.remark }}
+            </el-descriptions-item>
+          </el-descriptions>
+
+          <div class="basic-details-title border-none">
+            <span class="border-span">关联信息</span>
+          </div>
+
+          <linkMsg
+            v-if="isLink"
+            ref="linkMsgRef"
+            :id="categoryObj.id"
+            :categoryLevelId="categoryObj.categoryLevelId"
+            :categoryLevelGroupId="categoryObj.categoryLevelGroupId"
+          />
+
+          <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 selectTree from '@/components/selectTree';
+  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 { cityDataLabel } from 'ele-admin/packages/utils/regions';
+  import personSelect from '@/components/CommomSelect/person-select.vue';
+  import { getDetails } from '@/api/classifyManage/itemInformation';
+  import { sysDict, isExit } from '@/utils/sys';
+  import linkMsg from '@/views/ledgerAssets/equipment/components/link-msg.vue';
+  // import selectUpload from "@/components/selectUpload";
+  // import UploadImg from "@/components/uploadImg/WithView.vue";
+  import DialogGoods from '@/views/ledgerAssets/equipment/components/link-msg.vue';
+  // 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,
+    factoryworkstation
+  } from '@/api/ledgerAssets';
+  import { getUserPage } from '@/api/system/organization';
+  import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
+  import { listWorkshopByParentId, listFactoryLine } from '@/api/factoryModel';
+  import { getByCode } from '@/api/system/dictionary-data';
+  export default {
+    components: {
+      linkMsg,
+      //selectUpload,
+      //UploadImg,
+      selectTree,
+      FactoryLineSelect,
+      WithView,
+      WorkshopSelect,
+      FactoryAreaSelect,
+      WorkingProcedureSelect,
+      fileUpload,
+      imgUpload,
+      factorySelect,
+      DialogGoods,
+      DeptSelect,
+      personSelect
+    },
+    data() {
+      // 设备地址校验规则
+      // var addressValidation = (rule, array, callback) => {
+      //   if (array?.length > 0) {
+      //     var filterArray = array.filter((item) => item && item.trim());
+      //     console.log(filterArray);
+      //     if (filterArray.length > 0) {
+      //       callback();
+      //     } else {
+      //       callback(new Error('地址不能为空'));
+      //     }
+      //   } else {
+      //     callback(new Error('地址不能为空'));
+      //   }
+      // };
+      return {
+        treeList: [], // 使用岗位树
+        userList: [], // 人员列表
+        labelStyle: {
+          'min-width': '100px'
+        },
+        isLink: true,
+        categoryObj: {},
+        dictType: {
+          1: '是',
+          0: '否'
+        },
+        dictPd: {
+          1: '逐个盘点',
+          2: '批量盘点'
+        },
+        categoryMes: {
+          isModify: '',
+          isRework: '',
+          isRematerial: '',
+          isByProduct: '',
+          isWaste: '',
+          isDefective: ''
+        },
+        categoryWms: {}, //仓储
+        title: '新建设备信息',
+        pageType: 'add',
+        btnLoading: false,
+        // 设备主键id
+        id: '',
+        form: {
+          extInfoSelf: [],
+          // 基本信息
+          code: '',
+          name: '',
+          productTime: '',
+          workstation: {}
+        },
+        rules: {
+          name: [
+            { required: true, message: '请输入设备名称', trigger: 'blur' }
+          ],
+          // location: [{ validator: addressValidation, trigger: 'change' }],
+          code: [{ required: true, message: '请输入设备编码', trigger: 'blur' }]
+        },
+        // 基本信息
+        basicInfo: {},
+        assetInfo: {},
+        // 资产信息
+        zcInfo: {
+          factoryRoomId1: '',
+          factoryRoomId2: '',
+          factoryRoomId3: '',
+          factoryRoomId4: '',
+          factoryRoomId5: '',
+          factoryRoomName1: '',
+          factoryRoomName2: '',
+          factoryRoomName3: '',
+          factoryRoomName4: '',
+          factoryRoomName5: '',
+          // 	固定资产编码
+          fixCode: '',
+          // 颜色
+          color: '',
+          // 重量
+          weight: '',
+          // 维护部门code
+          repairGroupId: '',
+          repairDeptName: '',
+          repairUserId: '',
+          // 权属部门
+          ownershipGroupId: '',
+          ownershipUserId: '',
+          // 设备用途
+          purpose: '',
+          // 工序
+          roteId: '',
+          roteName: '',
+          //品牌
+          brand: '',
+          // 	供应商code
+          supplierId: '',
+          // 厂房
+          factoryRoomId: '',
+          roteCode: '',
+          codeNumber: '',
+          // 使用人
+          usePersonId: '',
+          // 有效期开始
+          startTime: '',
+          // 有效结束
+          endTime: '',
+          // 级别
+          level: '',
+          // 状态
+          status: '',
+          // 负责人
+          chargePersonId: '',
+          // 入账日期
+          entryDate: '',
+          // 周期
+          cycle: '',
+          // 备注
+          remark: '',
+          // 使用岗位
+          postId: ''
+        },
+        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: [],
+          cityDataLabel,
+          assetLevel: [], // 资产级别
+          deliveryCycle: [] // 送检周期
+        },
+        depList: [],
+        warehouseList: [],
+        areaList: [],
+        shelvesList: [],
+        suppList: [],
+        zjList: [],
+        cxList: []
+      };
+    },
+    watch: {},
+    computed: {
+      // 过保时间
+      expirationTime() {
+        if (this.form.productTime && this.basicInfo.expirationDate) {
+          return this.setGbTime(
+            this.form.productTime,
+            this.basicInfo.expirationDate,
+            this.basicInfo.expirationDateUnit
+          );
+        } else {
+          return '';
+        }
+      }
+    },
+    async created() {
+      // 获取资产级别下拉框
+      await this.getAssetLevelOptions();
+      // 获取部门岗位树
+      await this.getUsePostsTree();
+      //
+      await this.getDeliveryCycleOptions();
+      if (this.$route.query.id) {
+        this.pageType = 'edit';
+        this.id = this.$route.query.id;
+        await this.getInfo();
+        this.title = '编辑设备信息';
+        // this.getgys();
+        // await this._getWarehouseChildren();
+      }
+    },
+    methods: {
+      // 限制结束时间
+      endTimeRules() {
+        if (this.zcInfo.startTime) {
+          console.log(this.zcInfo.startTime);
+          console.log(new Date(this.zcInfo.startTime).getTime());
+          let differenceTime =
+            new Date(this.zcInfo.endTime).getTime() -
+            new Date(this.zcInfo.startTime).getTime();
+          if (differenceTime <= 0) {
+            this.$message.error('请选择正确的有效结束时间');
+            this.zcInfo.endTime = '';
+          }
+        } else {
+          this.$message.error('请选择有效开始时间');
+          this.zcInfo.endTime = '';
+        }
+      },
+      // 获取资产级别下拉
+      async getAssetLevelOptions() {
+        let { data } = await getByCode('asset_level');
+        this.options.assetLevel =
+          data.length > 0
+            ? data.map((item) => {
+                return {
+                  name: Object.keys(item)[0],
+                  id: item[Object.keys(item)[0]]
+                };
+              })
+            : [];
+      },
+      // 获取送检周期下拉
+      async getDeliveryCycleOptions() {
+        let { data } = await getByCode('delivery_cycle');
+        console.log(data);
+        this.options.deliveryCycle =
+          data.length > 0
+            ? data.map((item) => {
+                return {
+                  name: item[Object.keys(item)[0]],
+                  id: +Object.keys(item)[0]
+                };
+              })
+            : [];
+      },
+      // 使用岗位点击事件
+      async auditorDeptClick(data) {
+        console.log(data);
+        if (data) {
+          this.getStaffList(data);
+        } else {
+          this.zcInfo.chargePersonId = '';
+          this.zcInfo.usePersonId = '';
+          this.userList = [];
+        }
+      },
+      // 获取使用岗位列表树
+      async getUsePostsTree() {
+        const res = await warehouseDefinition.tree();
+        this.treeList = this.$util.toTreeData({
+          data: res,
+          idField: 'id',
+          parentIdField: 'parentId'
+        });
+      },
+      // 通过部门岗位获取人员列表
+      async getStaffList(id) {
+        let res = await warehouseDefinition.getUserPage({
+          groupId: id,
+          size: 9999,
+          page: 1
+        });
+        this.userList = res.list;
+      },
+      async getCxList(e) {
+        this.zcInfo.factoryRoomId4 = '';
+        this.zcInfo.factoryRoomId5 = '';
+        const data = await listFactoryLine([e]);
+        console.log('生产线---------', data);
+        this.cxList = data;
+      },
+      async returnItem1(item) {
+        this.zcInfo.factoryRoomId3 = '';
+        this.zcInfo.factoryRoomId4 = '';
+        this.zcInfo.factoryRoomId5 = '';
+        const data = await listWorkshopByParentId(item.id);
+        console.log('厂房-------------', data);
+        this.zjList = data;
+      },
+      async returnItem(item) {
+        const data = await factoryworkstation(item.id);
+        console.log('工位------', data);
+        if (data.workshopId) {
+          await this.returnItem1({ id: data.workshopId });
+        }
+        if (data.productionLineId) {
+          await this.getCxList(data.productionLineId);
+        }
+        // this.zcInfo.factoryRoomId1 = data.factoryId;
+        // this.zcInfo.factoryRoomName1 = data.factoryName;
+        // this.zcInfo.factoryRoomId2 = data.workshopPlanId;
+        // this.zcInfo.factoryRoomName2 = data.workshopPlanName;
+        // this.zcInfo.factoryRoomId3 = data.workshopId;
+        // this.zcInfo.factoryRoomName3 = data.workshopName;
+        // this.zcInfo.factoryRoomId4 = data.productionLineId;
+        // this.zcInfo.factoryRoomName4 = data.productionLineName;
+        this.zcInfo.factoryRoomId5 = data.id;
+        this.zcInfo.factoryRoomName5 = data.name;
+
+        this.zcInfo.roteId = data.taskList[0].id;
+        this.zcInfo.roteName = data.taskList[0].name;
+
+        this.zcInfo.ownershipGroupId = data.extInfo.principalDep;
+        await this.getqsbm();
+        this.zcInfo.ownershipUserId = data.leaderId;
+      },
+      // returnName1(val) {
+      //   this.zcInfo.factoryRoomName1 = val;
+      // },
+      // returnName2(val) {
+      //   this.zcInfo.factoryRoomName2 = val;
+      // },
+      // returnName3(val) {
+      //   this.zcInfo.factoryRoomName3 = val;
+      // },
+      // returnName4(val) {
+      //   this.zcInfo.factoryRoomName4 = val;
+      // },
+      // returnName5(val) {
+      //   this.zcInfo.factoryRoomName5 = val;
+      // },
+      async twoClick(val) {
+        this.positionInfo.workshopName = val.name;
+        const res = await warehouseDefinition.getListByAreaId(val.id);
+        this.shelvesList = res;
+      },
+      async changeWarehouse(val) {
+        this.positionInfo.factoryName = val.name;
+        const res = await warehouseDefinition.getListByWarehouseId(val.id);
+        this.areaList = res;
+      },
+      async _getWarehouseChildren() {
+        const res = await warehouseDefinition.list({});
+        this.warehouseList = res.map((item) => {
+          return { ...item, name: item.factoryName + '-' + item.name };
+        });
+
+        if (this.positionInfo.factoryCode) {
+          const params = {
+            id: this.positionInfo.factoryCode,
+            name: this.positionInfo.factoryName
+          };
+          this.changeWarehouse(params);
+        }
+        if (this.positionInfo.workshopCode) {
+          const params = {
+            id: this.positionInfo.workshopCode,
+            name: this.positionInfo.workshopName
+          };
+          this.twoClick(params);
+        }
+
+        // const res = await getWarehouseChildren();
+        // if (res?.success) {
+        //
+        // }
+      },
+      isExit,
+      handlwpbm() {
+        this.$refs.DialogGoods.open();
+      },
+      async cbDialogGoods(data) {
+        console.log(data);
+        this.basicInfo = data;
+        this.assetInfo = data;
+        this.form.rootCategoryLevelId =
+          this.basicInfo.categoryLevelPathId.split(',')[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 = data.code; //Date.now(); //res.data[0].onlyCode;
+        for (const key in this.depList) {
+          if (this.depList[key].id == data.deptId) {
+            this.basicInfo.name = this.depList[key].name;
+            this.basicInfo.groupName = this.depList[key].groupName;
+            return;
+          }
+        }
+      },
+      async seachDetail(id) {
+        this.isLink = false;
+        const res = await getDetails(id);
+        console.log('res==', res);
+        this.categoryWms = {
+          ...res.categoryWms,
+          warrantyWarnRefer: await sysDict(
+            '质保预警参考',
+            res.categoryWms.warrantyWarnRefer
+          ),
+          warrantyPeriodUnit: await sysDict(
+            '保质期单位',
+            res.categoryWms.warrantyPeriodUnit
+          )
+        };
+        this.categoryMes = {
+          ...res.categoryMes,
+          apsType: await sysDict('排程类型', res.categoryMes.apsType)
+        };
+        this.categoryObj = {
+          ...res.category,
+          fileName: res.category.remarkAttach
+            ? res.category.remarkAttach.map((item) => item.name).join(', ')
+            : ''
+        };
+        console.log(this.categoryObj);
+        this.isLink = true;
+      },
+      // 计算过保时间
+      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('请选择物品编码');
+        }
+        // if (!this.zcInfo.factoryRoomId1) {
+        //   return this.$message.error('请选择工厂');
+        // }
+        // if (!this.zcInfo.factoryRoomId2) {
+        //   return this.$message.error('请选择厂房');
+        // }
+        // if (!this.zcInfo.factoryRoomId3) {
+        //   return this.$message.error('请选择车间');
+        // }
+        // if (!this.zcInfo.factoryRoomId4) {
+        //   return this.$message.error('请选择产线');
+        // }
+        // if (!this.zcInfo.factoryRoomId5) {
+        //   return this.$message.error('请选择工位');
+        // }
+        this.$refs.form.validate((valid) => {
+          console.log('valid---------', valid);
+          console.log(this.form);
+          if (valid) {
+            console.log('ppp', this.positionInfo);
+            let par = {
+              //基本信息
+              ...this.form,
+              assetType: 1,
+              // 资产信息
+              positionIds: '1,1,1,1',
+              ...this.zcInfo,
+              position: {
+                detailPosition: this.positionInfo.detailPosition,
+                pathIds: `${
+                  this.positionInfo.factoryCode
+                    ? this.positionInfo.factoryCode + ','
+                    : ''
+                }${
+                  this.positionInfo.workshopCode
+                    ? this.positionInfo.workshopCode + ','
+                    : ''
+                }${this.positionInfo.lineCode}`,
+                pathName: `${
+                  this.positionInfo.factoryName
+                    ? this.positionInfo.factoryName + ','
+                    : ''
+                }${
+                  this.positionInfo.workshopName
+                    ? this.positionInfo.workshopName + ','
+                    : ''
+                }${this.positionInfo.lineName}`,
+                type: '1',
+                num: 1
+              },
+              factoryRoomId: '',
+              factoryRoomName: '',
+              // 文档信息
+              attUrl: this.setWd() || [],
+              // // 设备图片
+              imageUrl: this.imageUrl || {},
+              // 是否启用物联
+              isIotEnable: this.isIotEnable
+              // // 扩展字段
+
+              // extInfoSelf: this.setKz()
+            };
+            const factoryRoomIds = [
+              this.zcInfo.factoryRoomId1,
+              this.zcInfo.factoryRoomId2,
+              this.zcInfo.factoryRoomId3,
+              this.zcInfo.factoryRoomId4,
+              this.zcInfo.factoryRoomId5
+            ];
+            const nonEmptyFactoryRoomIds = factoryRoomIds.filter((id) => id);
+            par.factoryRoomId = nonEmptyFactoryRoomIds.join(',');
+            //---
+            const factoryRoomNames = [
+              this.zcInfo.factoryRoomName1,
+              this.zcInfo.factoryRoomName2,
+              this.zcInfo.factoryRoomName3,
+              this.zcInfo.factoryRoomName4,
+              this.zcInfo.factoryRoomName5
+            ];
+            const nonEmptyFactoryRoomNames = factoryRoomNames.filter(
+              (id) => id
+            );
+            par.factoryRoomName = nonEmptyFactoryRoomNames.join(',');
+            //==
+
+            console.log(par);
+            par.deviceLocationName = par.location
+              ? par.location.toString()
+              : '';
+            // par.sss = par.position.detailPosition;
+            //==
+            //============================
+            par.extInfo = { ...this.zcInfo };
+            let obj = {};
+            par.extInfoSelf.forEach((item) => {
+              obj[item.key] = item.value;
+            });
+            par.extInfoSelf = obj;
+            //============================
+            if (this.pageType == 'edit') {
+              par.id = this.id;
+            }
+            this.btnLoading = true;
+            console.log('sasasasa', par);
+            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 searchDeptNodeClick(id, ids) {
+        // 根据部门获取人员
+        const res = await getUserPage({
+          pageNum: 1,
+          size: -1,
+          executeGroupId: id
+        });
+        // const depId = res.list.find((item) => {
+        //   item.id == ids;
+        // });
+        // console.log('depId', depId);
+        this.depList = res.list;
+      },
+      // 获取设备详情
+      async getInfo() {
+        const data = await getAssetInfo(this.id);
+        console.log('获取设备详情-----', data);
+        this.auditorDeptClick(data.postId);
+        for (const key of Object.keys(this.zcInfo)) {
+          this.zcInfo[key] = data[key];
+        }
+        console.log(this.zcInfo);
+        data.extInfoSelf = data.extInfoSelf || [];
+        this.form = data;
+        this.form.location = data.deviceLocationName.split(',');
+        this.basicInfo = data.category;
+        this.assetInfo = data.category.category;
+        this.cbexpirationTime = data.expirationTime;
+        this.sourceDICT = data.sourceDICT;
+        this.networkStatus = data.networkStatus;
+
+        if (data.factoryRoomId) {
+          const pathIds = data.factoryRoomId.split(',');
+          this.zcInfo.factoryRoomId1 = pathIds[0];
+          this.zcInfo.factoryRoomId2 = pathIds[1];
+          this.zcInfo.factoryRoomId3 = pathIds[2];
+          this.zcInfo.factoryRoomId4 = pathIds[3];
+          this.zcInfo.factoryRoomId5 = pathIds[4];
+          if (this.zcInfo.factoryRoomId2) {
+            this.returnItem1({ id: pathIds[1] });
+          }
+          if (this.zcInfo.factoryRoomId3) {
+            this.getCxList(pathIds[2]);
+          }
+        }
+
+        if (data.detailPosition) {
+          this.positionInfo.detailPosition = data.detailPosition;
+
+          const pathIds = data.positionList[0].pathIds.split(',');
+          const pathName = data.positionList[0].pathName.split(',');
+
+          // this.zcInfo.factoryRoomId1 = pathIds[0];
+
+          // this.zcInfo.factoryRoomId2 = pathIds[1];
+
+          // this.zcInfo.factoryRoomId3 = pathIds[2];
+
+          // this.zcInfo.factoryRoomId4 = pathIds[3];
+
+          // this.zcInfo.factoryRoomId5 = pathIds[4];
+
+          this.$nextTick(() => {
+            // this.$refs.WorkshopSelectRef.getList();
+            // this.$refs.FactoryLineSelectRef.getList();
+          });
+          console.log('data', data);
+          this.isLink = false;
+          this.categoryWms = {
+            ...data.category.categoryWms,
+            warrantyWarnRefer: await sysDict(
+              '质保预警参考',
+              data.category.categoryWms.warrantyWarnRefer
+            ),
+            warrantyPeriodUnit: await sysDict(
+              '保质期单位',
+              data.category.categoryWms.warrantyPeriodUnit
+            )
+          };
+          this.categoryMes = {
+            ...data.category.categoryMes,
+            apsType: await sysDict(
+              '排程类型',
+              data.category.categoryMes.apsType
+            )
+          };
+          this.categoryObj = {
+            ...data.category.category,
+            fileName: data.category.category.remarkAttach
+              ? data.category.category.remarkAttach
+                  .map((item) => item.name)
+                  .join(', ')
+              : ''
+          };
+          this.isLink = true;
+        }
+        // // 资产信息
+        // this.zcInfo.codeNumber = data.codeNumber;
+        // this.zcInfo.fixCode = data.fixCode;
+
+        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;
+        //供应商
+        const rep = await warehouseDefinition.eomContact({
+          type: 2,
+          status: 1,
+          size: -1,
+          pageNum: 1
+        });
+        this.suppList = rep.list;
+      },
+      // 设置标准产能
+      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>
+  ::v-deep .descriptions {
+    margin-bottom: 10px;
+  }
+  ::v-deep .el-descriptions__table tbody:nth-child(4) {
+    .el-descriptions-row {
+      .el-descriptions-item__cell:last-child {
+      }
+    }
+  }
+  .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: 100%;
+  }
+  .kzzd {
+    width: 500px;
+    .add-col {
+      display: flex;
+      .col-input {
+        & + .col-input {
+          margin-left: 10px;
+        }
+      }
+      .del {
+        margin-left: 10px;
+      }
+    }
+  }
+  ::v-deep .el-descriptions {
+    .el-form-item {
+      margin-bottom: 0px;
+    }
+  }
+</style>

+ 7 - 1
src/views/ledgerAssets/dryArea/components/dryArea-list.vue

@@ -64,6 +64,12 @@
 
 <script>
   import dryAreaSearch from './dryArea-search.vue';
+  import {
+    getAssetList,
+    downloadAsset,
+    getNetworkCount,
+    batchDel
+  } from '@/api/ledgerAssets';
   import { getList, removeItem } from '@/api/ledgerAssets/dryArea';
   import dictMixins from '@/mixins/dictMixins';
   import UserEdit from './user-edit.vue';
@@ -148,7 +154,7 @@
     methods: {
       /* 表格数据源 */
       datasource({ page, limit, where }) {
-        return getList({
+        return getAssetList({
           ...where,
           pageNum: page,
           size: limit,

+ 3 - 0
src/views/ledgerAssets/equipment/edit.vue

@@ -1686,6 +1686,9 @@
         }
         console.log(this.zcInfo);
         data.extInfoSelf = data.extInfoSelf || [];
+        if (!data.workstation) {
+          data.workstation = {};
+        }
         this.form = data;
         this.form.location = data.deviceLocationName.split(',');
         this.basicInfo = data.category;

+ 129 - 129
src/views/ledgerAssets/meter/components/baseInfo.vue

@@ -22,47 +22,47 @@
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 大模体型号 </template>
-        {{info.extraInfo.dieBodyModel}}
+        {{ info.extraInfo.dieBodyModel }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 芯杆数量 </template>
-       {{info.extraInfo.mandrelNum}}
+        {{ info.extraInfo.mandrelNum }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 模孔数量</template>
-        {{info.extraInfo.dieHoleNum}}
+        {{ info.extraInfo.dieHoleNum }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 收缩系数</template>
-        {{info.extraInfo.shrinkageCoefficient}}
+        {{ info.extraInfo.shrinkageCoefficient }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 下冲头数量 </template>
-        {{info.extraInfo.lowerPunchNum}}
+        {{ info.extraInfo.lowerPunchNum }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 上冲头数量 </template>
-        {{info.extraInfo.upperPunchNum}}
+        {{ info.extraInfo.upperPunchNum }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 最大冲压次数</template>
-        {{info.extraInfo.maximumStampingTimes}}
+        {{ info.extraInfo.maximumStampingTimes }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label" :span="2"> 分类 </template>
-        {{info.baseInfo.categoryLevelPath}}
+        {{ info.baseInfo.categoryLevelPath }}
       </el-descriptions-item>
-      <el-descriptions-item >
+      <el-descriptions-item>
         <template slot="label"> 采购日期 </template>
         <!-- {{info.warehouseDetail.procurementTime}} -->
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 过保日期 </template>
-       <!-- {{info.warehouseDetail.expirationTime}} -->
+        <!-- {{info.warehouseDetail.expirationTime}} -->
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 计量单位</template>
-        {{info.baseInfo.measuringUnit}}
+        {{ info.baseInfo.measuringUnit }}
       </el-descriptions-item>
     </el-descriptions>
 
@@ -72,48 +72,45 @@
     <el-descriptions title="" :column="4" size="medium" border>
       <el-descriptions-item>
         <template slot="label"> 固资编码 </template>
-        {{info.fixCode}}
+        {{ info.fixCode }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 出库时间</template>
         <!-- {{info.warehouseDetail.createTime}} -->
       </el-descriptions-item>
       <el-descriptions-item :span="2">
-        <template slot="label">  {{sourceType==1?'入库单号':'出库单号'}}  </template>
+        <template slot="label">
+          {{ sourceType == 1 ? '入库单号' : '出库单号' }}
+        </template>
         <!-- <el-link style="color: #70B603" @click="jumpDetails">{{info.warehouseDetail.bizNum}}</el-link> -->
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 所属工序</template>
-        {{info.processName}}
+        {{ info.processName }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 权属部门 </template>
-        {{info.ownershipDeptName}}
+        {{ info.ownershipDeptName }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 品牌 </template>
-        {{info.brand}}
+        {{ info.brand }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 供应商</template>
-        {{info.supplierName}}
+        {{ info.supplierName }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 供应商电话 </template>
-        {{info.supplierMobile}}
+        {{ info.supplierMobile }}
       </el-descriptions-item>
-
     </el-descriptions>
     <div class="basic-details-title border-none">
       <span class="border-span">文档信息</span>
     </div>
     <div class="upload-container">
       <div class="img-box">
-        <img
-          src="~@/assets/upload-placeholder.svg"
-          alt=""
-          v-if="!imageUrl"
-        />
+        <img src="~@/assets/upload-placeholder.svg" alt="" v-if="!imageUrl" />
         <img v-else :src="imageUrl" alt="设备图片" />
       </div>
       <div class="file-list">
@@ -139,11 +136,11 @@
         :span="1"
       >
         <template slot="label"> {{ item.key }} </template>
-        <div>{{item.value}}</div>
+        <div>{{ item.value }}</div>
       </el-descriptions-item>
     </el-descriptions>
 
-<!--    <DetailsDialog
+    <!--    <DetailsDialog
       ref="detailsDialogRef"
     /> -->
   </div>
@@ -154,125 +151,128 @@
   import { getFile } from '@/api/system/file/index.js';
   import { getAssetInfo } from '@/api/ledgerAssets';
   import { getDetails } from '@/api/classifyManage/itemInformation';
-export default {
-  props: {
-    rowId:{
-      type:String ,
-      default:''
+  export default {
+    props: {
+      rowId: {
+        type: String,
+        default: ''
+      }
     },
-  },
-  // components: { DetailsDialog },
-  data () {
-    return {
-      fileList: [
-        { t_name: '使用说明书' },
-        { t_name: '生产许可证书' },
-        { t_name: '防爆合格证书' },
-        { t_name: '检验报告' },
-        { t_name: '检验周期说明' },
-        { t_name: '图纸资料' },
-        { t_name: '产品合格证' }
-      ],
-      info:{
-        baseInfo:{},
-        extInfoSelf:[],
-        extraInfo:{}
-      },
-      // 设备图片
-      imageUrl: '',
-      sourceType:null
-    }
-  },
-  created () {
-     this.getDetilInfo()
-  },
-  methods:{
-     async getDetilInfo(){
-       const data = await getAssetInfo(this.rowId)
-       if (data){
-         this.info = data;
-         this.$set(this.info, 'baseInfo', data.category.category)
-         this.$set(this.info, 'extraInfo', data.category.categoryMold)
-          this.sourceType = data.positionList[0].type
+    // components: { DetailsDialog },
+    data() {
+      return {
+        fileList: [
+          { t_name: '使用说明书' },
+          { t_name: '生产许可证书' },
+          { t_name: '防爆合格证书' },
+          { t_name: '检验报告' },
+          { t_name: '检验周期说明' },
+          { t_name: '图纸资料' },
+          { t_name: '产品合格证' }
+        ],
+        info: {
+          baseInfo: {},
+          extInfoSelf: [],
+          extraInfo: {}
+        },
+        // 设备图片
+        imageUrl: '',
+        sourceType: null
+      };
+    },
+    created() {
+      this.getDetilInfo();
+    },
+    methods: {
+      async getDetilInfo() {
+        const data = await getAssetInfo(this.rowId);
+        if (data) {
+          this.info = data;
+          console.log('data-------------', data);
+          this.$set(this.info, 'baseInfo', data.category.category);
+          this.$set(this.info, 'extraInfo', data.category.categoryMold);
+          this.sourceType = data.positionList[0].type;
           // 设备图片
-          if(typeof data.imageUrl !='string' ){
-             this.imageUrl  = getImageUrl(data.imageUrl.storePath)
+          if (typeof data.imageUrl != 'string') {
+            this.imageUrl = getImageUrl(data.imageUrl.storePath);
           }
           if (data.attUrl && data.attUrl.length > 0) {
             // 文档信息
             data.attUrl.forEach((item, index) => {
-              Object.assign(this.fileList[item.sort - 1], item)
-            })
+              Object.assign(this.fileList[item.sort - 1], item);
+            });
           }
-       }
-     },
-
-     // 打开详情弹窗
-     jumpDetails(){
-       if(!this.info.warehouseDetail){
-         return
-       }
-        this.$refs.detailsDialogRef.init(this.info.warehouseDetail,this.sourceType)
-     },
+        }
+      },
 
-     openfile(row) {
-       if (row.accessUrl) {
-         fileSystemDownload(row)
-       }
-     }
+      // 打开详情弹窗
+      jumpDetails() {
+        if (!this.info.warehouseDetail) {
+          return;
+        }
+        this.$refs.detailsDialogRef.init(
+          this.info.warehouseDetail,
+          this.sourceType
+        );
+      },
 
-  }
-}
+      openfile(row) {
+        if (row.accessUrl) {
+          fileSystemDownload(row);
+        }
+      }
+    }
+  };
 </script>
 
 <style lang="scss" scoped>
-.baseinfo-container {
-  background-color: #fff;
-  padding: 0px 20px 20px;
-  .content {
-    padding: 0 20px;
-  }
-  .basic-details-title{
-    font-size: 16px;
-    margin: 15px 0;
-  }
-  .upload-container {
-    display: flex;
-    .img-box {
-      width: 280px;
-      height: 342px;
-      border: 1px solid rgba(215, 215, 215, 1);
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      img {
-        max-width: 100%;
-      }
+  .baseinfo-container {
+    background-color: #fff;
+    padding: 0px 20px 20px;
+    .content {
+      padding: 0 20px;
+    }
+    .basic-details-title {
+      font-size: 16px;
+      margin: 15px 0;
     }
-    .file-list {
-      margin-left: 50px;
-      flex: 1;
+    .upload-container {
       display: flex;
-      justify-content: space-between;
-      flex-wrap: wrap;
-      justify-items: baseline;
-      align-content: flex-start;
-      .file-box {
-        width: 30%;
-        margin-bottom: 20px;
-        height: 57px;
-        text-align: center;
-        line-height: 55px;
-        border: 1px solid #1890ff;
-        color: #1890ff;
-        cursor: pointer;
-        &.disabled {
-          cursor: not-allowed;
-          border-color: rgba(215, 215, 215, 1);
-          color: rgba(215, 215, 215, 1);
+      .img-box {
+        width: 280px;
+        height: 342px;
+        border: 1px solid rgba(215, 215, 215, 1);
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        img {
+          max-width: 100%;
+        }
+      }
+      .file-list {
+        margin-left: 50px;
+        flex: 1;
+        display: flex;
+        justify-content: space-between;
+        flex-wrap: wrap;
+        justify-items: baseline;
+        align-content: flex-start;
+        .file-box {
+          width: 30%;
+          margin-bottom: 20px;
+          height: 57px;
+          text-align: center;
+          line-height: 55px;
+          border: 1px solid #1890ff;
+          color: #1890ff;
+          cursor: pointer;
+          &.disabled {
+            cursor: not-allowed;
+            border-color: rgba(215, 215, 215, 1);
+            color: rgba(215, 215, 215, 1);
+          }
         }
       }
     }
   }
-}
 </style>

+ 2 - 2
src/views/ledgerAssets/meter/components/data-list.vue

@@ -204,7 +204,7 @@
       // 跳转到详情页
       details({ id }) {
         this.$router.push({
-          path: '/ledgerAssets/mould/detail',
+          path: '/ledgerAssets/meter/detail',
           query: {
             id
           }
@@ -213,7 +213,7 @@
       // 跳转到编辑页
       goEdit({ id }) {
         this.$router.push({
-          path: '/ledgerAssets/mould/edit',
+          path: '/ledgerAssets/meter/edit',
           query: {
             id
           }

+ 31 - 34
src/views/ledgerAssets/meter/detail.vue

@@ -2,47 +2,44 @@
   <div class="ele-body">
     <!-- tab切换 -->
     <el-card :body-style="{ padding: 0 }">
-       <div class="page-title">
-         <el-page-header @back="$router.go(-1)">
-           <div slot="content" class="pageContent">
-             <div>模具信息详情</div>
-           </div>
-         </el-page-header>
-       </div>
-       <div class="content-wrapper">
-         <component :is="activeComp" :rowId="rowId"></component>
-       </div>
+      <div class="page-title">
+        <el-page-header @back="$router.go(-1)">
+          <div slot="content" class="pageContent">
+            <div>仪表计量设备信息详情</div>
+          </div>
+        </el-page-header>
+      </div>
+      <div class="content-wrapper">
+        <component :is="activeComp" :rowId="rowId"></component>
+      </div>
     </el-card>
   </div>
 </template>
 
 <script>
-import baseInfo from './components/baseInfo.vue'
-export default {
-  components: {
-    baseInfo,
-  },
-  data () {
-    return {
-      activeComp: 'baseInfo',
-      tabOptions: [
-        { key: 'baseInfo', name: '基本信息' }
-      ],
-      rowId:null
-    }
-  },
-
-  created () {
-     this.rowId = this.$route.query.id
-  },
+  import baseInfo from './components/baseInfo.vue';
+  export default {
+    components: {
+      baseInfo
+    },
+    data() {
+      return {
+        activeComp: 'baseInfo',
+        tabOptions: [{ key: 'baseInfo', name: '基本信息' }],
+        rowId: null
+      };
+    },
 
-}
+    created() {
+      this.rowId = this.$route.query.id;
+    }
+  };
 </script>
 
 <style lang="scss" scoped>
-   .page-title{
-     background: #fff;
-     padding:26px 10px 15px;
-     border-bottom:1px solid #eaeefb;
-   }
+  .page-title {
+    background: #fff;
+    padding: 26px 10px 15px;
+    border-bottom: 1px solid #eaeefb;
+  }
 </style>

+ 1 - 1
src/views/ledgerAssets/meter/edit.vue

@@ -5,7 +5,7 @@
         <div class="page-title basic-details-title">
           <el-page-header @back="$router.go(-1)">
             <div slot="content" class="pageContent">
-              <div>编辑模具信息</div>
+              <div>编辑仪表计量信息</div>
             </div>
           </el-page-header>
           <div>

+ 2 - 1
src/views/ledgerAssets/mould/components/baseInfo.vue

@@ -434,7 +434,8 @@
           this.info = data;
           this.$set(this.info, 'baseInfo', data.category.category);
           this.$set(this.info, 'extraInfo', data.category.categoryMold);
-          this.sourceType = data.positionList[0].type;
+          this.sourceType =
+            data.positionList.length > 0 && data.positionList[0].type;
           // 设备图片
           if (typeof data.imageUrl != 'string') {
             this.imageUrl = getImageUrl(data.imageUrl.storePath);

+ 2 - 1
src/views/ledgerAssets/turnoverCar/components/baseInfo.vue

@@ -164,7 +164,8 @@
         const res = await getAssetInfo(this.rowId);
         if (res) {
           this.info = res;
-          this.sourceType = res.positionList[0].type;
+          this.sourceType =
+            res.positionList.length > 0 ? res.positionList[0].type : '';
           this.$set(this.info, 'category', res.category);
           this.$set(
             this.info,

+ 58 - 0
src/views/maintenance/equipment/index.vue

@@ -0,0 +1,58 @@
+<template>
+  <div class="equipment">
+    <div class="ele-body">
+      <el-card shadow="never">
+        <div class="switch">
+          <div class="switch_left">
+            <ul>
+              <li
+                v-for="item in tabOptions"
+                :key="item.key"
+                :class="{ active: activeComp == item.key }"
+                @click="activeComp = item.key"
+              >
+                {{ item.name }}
+              </li>
+            </ul>
+          </div>
+        </div>
+        <div class="main">
+          <div v-if="activeComp == 'plan'">
+            <plan />
+          </div>
+          <div v-else>
+            <workOrder />
+          </div>
+        </div>
+      </el-card>
+    </div>
+  </div>
+</template>
+<script>
+  import plan from './plan';
+  import workOrder from './workOrder';
+  export default {
+    components: { plan, workOrder },
+    data() {
+      return {
+        activeComp: 'plan',
+        tabOptions: [
+          { key: 'plan', name: '计划' },
+          { key: 'workOrder', name: '工单' }
+        ]
+      };
+    }
+  };
+</script>
+<style lang="scss" scoped>
+  ::v-deep .el-card__body {
+    padding-top: 0;
+    padding-left: 0;
+  }
+  .main {
+    padding-left: 17px;
+    .plan {
+      padding-top: 15px;
+    }
+  }
+</style>

+ 0 - 0
src/views/maintenance/equipment/work/components/work-search.vue → src/views/maintenance/equipment/workOrder/components/work-search.vue


+ 0 - 0
src/views/maintenance/equipment/work/details.vue → src/views/maintenance/equipment/workOrder/details.vue


+ 0 - 0
src/views/maintenance/equipment/work/index.vue → src/views/maintenance/equipment/workOrder/index.vue


+ 58 - 0
src/views/maintenance/patrol/index.vue

@@ -0,0 +1,58 @@
+<template>
+  <div class="patrol">
+    <div class="ele-body">
+      <el-card shadow="never">
+        <div class="switch">
+          <div class="switch_left">
+            <ul>
+              <li
+                v-for="item in tabOptions"
+                :key="item.key"
+                :class="{ active: activeComp == item.key }"
+                @click="activeComp = item.key"
+              >
+                {{ item.name }}
+              </li>
+            </ul>
+          </div>
+        </div>
+        <div class="main">
+          <div v-if="activeComp == 'plan'">
+            <plan />
+          </div>
+          <div v-else>
+            <workOrder />
+          </div>
+        </div>
+      </el-card>
+    </div>
+  </div>
+</template>
+<script>
+  import plan from './plan';
+  import workOrder from './workOrder';
+  export default {
+    components: { plan, workOrder },
+    data() {
+      return {
+        activeComp: 'plan',
+        tabOptions: [
+          { key: 'plan', name: '计划' },
+          { key: 'workOrder', name: '工单' }
+        ]
+      };
+    }
+  };
+</script>
+<style lang="scss" scoped>
+  ::v-deep .el-card__body {
+    padding-top: 0;
+    padding-left: 0;
+  }
+  .main {
+    padding-left: 17px;
+    .plan {
+      padding-top: 15px;
+    }
+  }
+</style>

+ 0 - 0
src/views/maintenance/patrol/work/components/work-search.vue → src/views/maintenance/patrol/workOrder/components/work-search.vue


+ 0 - 0
src/views/maintenance/patrol/work/details.vue → src/views/maintenance/patrol/workOrder/details.vue


+ 0 - 0
src/views/maintenance/patrol/work/index.vue → src/views/maintenance/patrol/workOrder/index.vue


+ 1 - 1
vue.config.js

@@ -35,7 +35,7 @@ module.exports = {
         // target: 'http://124.71.68.31:50001',
         // target: 'http://192.168.1.139:18086', // 粟
         // target: 'http://192.168.1.132:18086', // 徐
-        target: 'http://192.168.1.176:18086', //本
+        target: 'http://192.168.1.110:18086', //本
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
           '^/api': ''