Просмотр исходного кода

修改基础建模路径,使用全局词典

lupeng 1 год назад
Родитель
Сommit
31f1051df3

+ 0 - 16
src/common/configs/dictDataUtil.ts

@@ -18,22 +18,6 @@ const DictDataUtil = {
     device_run_status: "device_run_status",
     //设备维护频率
     device_maintenance_cycle: "device_maintenance_cycle",
-    //物料属性
-    material_properties:"material_properties",
-    //单位
-    unit:"danwei_type",
-    //物料级别
-    material_level:"material_level",
-    //质检方案
-    quality_testing_plan:"quality_testing_plan",
-    //适用平台
-    applicable_platforms:"applicable_platforms",
-    //质量等级
-    quality_grade:"quality_grade",
-    //选用类型
-    selection_type:"selection_type",
-    //阶段
-    stage:"stage",
     //封装方法
     packaging_method:"packaging_method",
   },

+ 10 - 10
src/views/base/materials/columns.ts

@@ -18,7 +18,7 @@ export const columns = [
     search: true,
     filterable: true,
     type: 'select',
-    dicUrl:dictDataUtil.request_url+dictDataUtil.TYPE_CODE.material_properties,
+    dicData:dicts.material_properties,
     props: { label: "dictLabel", value: "dictValue" },
     rules: [{
       required: true,
@@ -37,7 +37,7 @@ export const columns = [
     search: true,
     filterable: true,
     type: "select",
-    dicUrl:dictDataUtil.request_url+dictDataUtil.TYPE_CODE.unit,
+    dicData:dicts.danwei_type,
     props: { label: "dictLabel", value: "dictValue" },
     rules: [{
       required: true,
@@ -51,7 +51,7 @@ export const columns = [
     search: true,
     filterable: true,
     type: "select",
-    dicUrl:dictDataUtil.request_url+dictDataUtil.TYPE_CODE.material_level,
+    dicData:dicts.material_level,
     props: { label: "dictLabel", value: "dictValue" },
     rules: [{
       required: true,
@@ -70,7 +70,7 @@ export const columns = [
     search: true,
     filterable: true,
     type: "select",
-    dicUrl:dictDataUtil.request_url+dictDataUtil.TYPE_CODE.quality_testing_plan,
+    dicData:dicts.quality_testing_plan,
     props: { label: "dictLabel", value: "dictValue" },
   },
   {
@@ -79,7 +79,7 @@ export const columns = [
     search: true,
     filterable: true,
     type: "select",
-    dicUrl:dictDataUtil.request_url+dictDataUtil.TYPE_CODE.applicable_platforms,
+    dicData:dicts.applicable_platforms,
     props: { label: "dictLabel", value: "dictValue" },
     rules: [{
      required: true, message: "请选择适用平台",
@@ -92,7 +92,7 @@ export const columns = [
     search: true,
     filterable: true,
     type: "select",
-    dicUrl:dictDataUtil.request_url+dictDataUtil.TYPE_CODE.quality_grade,
+    dicData:dicts.quality_grade,
     props: { label: "dictLabel", value: "dictValue" },
     rules: [{
       required: true,
@@ -106,7 +106,7 @@ export const columns = [
     search: true,
     filterable: true,
     type: "select",
-    dicUrl:dictDataUtil.request_url+dictDataUtil.TYPE_CODE.selection_type,
+    dicData:dicts.selection_type,
     props: { label: "dictLabel", value: "dictValue" },
   },
   {
@@ -115,7 +115,7 @@ export const columns = [
     search: true,
     filterable: true,
     type: "select",
-    dicUrl:dictDataUtil.request_url+dictDataUtil.TYPE_CODE.stage,
+    dicData:dicts.stage,
     props: { label: "dictLabel", value: "dictValue" },
   },
   { label: "客户型号", prop: "customerModel", search: true },
@@ -132,8 +132,8 @@ export const columns = [
     search: true,
     filterable: true,
     type: "select",
-    dicUrl:dictDataUtil.request_url+dictDataUtil.TYPE_CODE.packaging_method,
-    props: { label: "dictLabel", value: "dictValue" },
+    dicData:dicts.packaging_method,
+    props: { label: "dictLabel", value: "dictLabel" },
   },
 
   {

+ 28 - 3
src/views/base/factory/index.vue

@@ -15,7 +15,7 @@
       @row-del="deleteRow"
       @selection-change="selectionChange"
     >
-      <template #menu-left="{ size }">
+      <!--<template #menu-left="{ size }">
         <el-button
           :disabled="toDeleteIds.length < 1"
           type="danger"
@@ -24,8 +24,24 @@
           @click="multipleDelete"
         >删除</el-button
         >
+      </template>-->
+      <template #menu="{row,index,type}">
+        <el-button @click="binding(row)"
+                   icon="el-icon-link"
+                   text
+                   type="primary"
+                   :size="size">绑定子项</el-button>
       </template>
+
     </avue-crud>
+    <el-dialog
+      v-model="dialog.visible"
+      :title="dialog.title"
+      width="850px"
+      @close="dialog.visible = false"
+    >
+       <device-page @deviceInfo="deviceInfo"/>
+    </el-dialog>
   </div>
 </template>
 <script setup>
@@ -41,11 +57,19 @@
     isShowTable.value = true;
     tableType.value = tableType.value == 1 ? 2 : 1;
   };
-
+  const dialog = reactive({
+    title: "绑定子项",
+    visible: false,
+  });
+  const binding =(row)=>{
+    console.info(row);
+    console.log(row.factoryName);
+    dialog.visible = true;
+  }
   // 传入一个url,后面不带/
   const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
     useCrud({
-      src: "/api/v1/base/workShop",
+      src: "/api/v1/base/factory",
     });
   const { dataList, createRow, updateRow, deleteRow } = Methords; //增删改查
   const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
@@ -64,6 +88,7 @@
   option.value = Object.assign(option.value, {
     selection: true,
     viewBtn: true,
+    menuWidth: 320,
     column: [
       // 添加一个自增列
       {

+ 5 - 0
src/views/base/modeling/index.vue

@@ -0,0 +1,5 @@
+<template>
+  <div>
+    <router-view />
+  </div>
+</template>

src/views/base/production-line/index.vue → src/views/base/modeling/production-line/index.vue


+ 2 - 31
src/views/base/station/index.vue

@@ -16,38 +16,9 @@
       @current-change="dataList"
       @selection-change="selectionChange"
     >
-      <template #menu-left="{ size }">
-        <el-button
-          :disabled="toDeleteIds.length < 1"
-          type="danger"
-          icon="el-icon-delete"
-          :size="size"
-          @click="multipleDelete"
-        >删除</el-button
-        >
-      </template>
-      <template #menu-right="{}">
-        <el-dropdown split-button
-        >导入
-          <template #dropdown>
-            <el-dropdown-menu>
-              <el-dropdown-item
-                @click="downloadTemplate('/api/v1/plan/order/template')"
-              >
-                <i-ep-download />下载模板
-              </el-dropdown-item>
-              <el-dropdown-item @click="importExcelData">
-                <i-ep-top />导入数据
-              </el-dropdown-item>
-            </el-dropdown-menu>
-          </template>
-        </el-dropdown>
-        <el-button class="ml-3" @click="exportData">
-          <template #icon> <i-ep-download /> </template>导出
-        </el-button>
-      </template>
+
     </avue-crud>
-    <ExcelUpload ref="uploadRef" @finished="uploadFinished" />
+
   </div>
 </template>
 <script setup>

src/views/base/work-shop/index.vue → src/views/base/modeling/work-shop/index.vue