lxb 1 vuosi sitten
vanhempi
commit
e28eb39ef4
23 muutettua tiedostoa jossa 2071 lisäystä ja 301 poistoa
  1. 3 3
      imcs-ui/.env.production
  2. 20 1
      imcs-ui/.env.staging
  3. 2 1
      imcs-ui/package.json
  4. 27 3
      imcs-ui/src/api/Dispatch.js
  5. 76 0
      imcs-ui/src/api/prepareProductMgr/TTechnologyFile.js
  6. 7 0
      imcs-ui/src/api/statisticalAnalysis/productlineAvailability.js
  7. BIN
      imcs-ui/src/assets/device/liaozhan.jpg
  8. BIN
      imcs-ui/src/assets/device/mazak.png
  9. 1 0
      imcs-ui/src/lang/zh/resource.js
  10. 6 0
      imcs-ui/src/lang/zh/zh.js
  11. 372 34
      imcs-ui/src/views/zuihou/dispatchMgr/productLineInfo/Index.vue
  12. 454 147
      imcs-ui/src/views/zuihou/largeScreen/twoDatasModel/Index.vue
  13. 8 3
      imcs-ui/src/views/zuihou/lineSideLibrary/lineSideEmulate/Index.vue
  14. 26 0
      imcs-ui/src/views/zuihou/machiningClient/touchScreen/Index.vue
  15. 127 0
      imcs-ui/src/views/zuihou/prepareProductMgr/technologyFile/Edit.vue
  16. 63 0
      imcs-ui/src/views/zuihou/prepareProductMgr/technologyFile/Index.vue
  17. 265 0
      imcs-ui/src/views/zuihou/prepareProductMgr/technologyFile/TechnologyFile.vue
  18. 263 0
      imcs-ui/src/views/zuihou/prepareProductMgr/technologyFile/TechnologyFileItem.vue
  19. 136 0
      imcs-ui/src/views/zuihou/prepareProductMgr/technologyFile/TechnologyItemEdit.vue
  20. 42 9
      imcs-ui/src/views/zuihou/prepareProductMgr/technologyVersion/components/programForm/components/ProgramncMgr.vue
  21. 44 44
      imcs-ui/src/views/zuihou/resourceProductMgr/resourcesMgr/components/AutoCodeEdit.vue
  22. 55 54
      imcs-ui/src/views/zuihou/resourceProductMgr/resourcesMgr/components/TenantCodeEdit.vue
  23. 74 2
      package-lock.json

+ 3 - 3
imcs-ui/.env.production

@@ -2,9 +2,9 @@
 ENV = 'production'
 
 # webSocket的推送URL
-VUE_APP_WS_URL = 'ws://192.168.170.32:8764/ws/'
+VUE_APP_WS_URL = 'ws://192.168.1.240:8764/ws/'
 
-VUE_APP_PROJECT_NAME = 'imcs-ui'
+#VUE_APP_PROJECT_NAME = 'imcs-ui'
 # 开发环境请求域名前缀, 该变量仅仅开发环境需要设置
 #VUE_APP_DEV_REQUEST_DOMAIN_PREFIX = 'http://192.168.170.32/'
 # 请求域名前缀, 该变量仅仅生产环境需要设置
@@ -26,4 +26,4 @@ VUE_APP_CLIENT_SECRET=zuihou_ui_secret
 VUE_APP_IS_CAPTCHA = true
 
 # 产线默认设定
-VUE_APP_ZONE_LINE = 2
+VUE_APP_ZONE_LINE = 1

+ 20 - 1
imcs-ui/.env.staging

@@ -3,6 +3,25 @@ NODE_ENV = production
 # just a flag
 ENV = 'staging'
 
+
+
+
 # base api
-VUE_APP_BASE_API = '/stage-api'
+VUE_APP_BASE_API = '/api'
+
+VUE_APP_PROD_REQUEST_DOMAIN_PREFIX = ''
+
+# 是否启用多租户
+VUE_APP_IS_MULTI_TENANT = true
+
+# 客户端秘钥
+VUE_APP_CLIENT_ID=zuihou_ui
+VUE_APP_CLIENT_SECRET=zuihou_ui_secret
+
+# 是否启用验证码
+VUE_APP_IS_CAPTCHA = true
+
+# 产线默认设定
+VUE_APP_ZONE_LINE = 1
+
 

+ 2 - 1
imcs-ui/package.json

@@ -39,6 +39,7 @@
     "driver.js": "0.9.5",
     "dropzone": "5.5.1",
     "echarts": "^5.2.2",
+    "echarts-liquidfill": "^3.1.0",
     "element-ui": "2.15.6",
     "file-saver": "2.0.1",
     "fuse.js": "3.4.4",
@@ -98,12 +99,12 @@
     "lint-staged": "8.1.5",
     "mockjs": "1.0.1-beta3",
     "node-sass": "6.0.1",
-    "sass-loader": "^10.0.1",
     "plop": "2.3.0",
     "pug": "^3.0.2",
     "pug-plain-loader": "^1.1.0",
     "qs": "^6.10.2",
     "runjs": "^4.3.2",
+    "sass-loader": "^10.0.1",
     "script-ext-html-webpack-plugin": "2.1.3",
     "script-loader": "0.7.2",
     "serve-static": "^1.13.2",

+ 27 - 3
imcs-ui/src/api/Dispatch.js

@@ -26,8 +26,12 @@ const apiList = {
     url: `/authority/dispatch/preview`
   },
   selectLogs: {
-    method: 'GET',
+    method: 'POST',
     url: `/authority/dispatchRecord/selectLogs`
+  },
+  getPointInfo: {
+    method: 'POST',
+    url: `/authority/plc/getPointInfo`
   }
 }
 
@@ -62,9 +66,29 @@ export default {
       data
     })
   },
-  selectLogs(){
+  selectLogs(data){
+    return axiosApi({
+      ...apiList.selectLogs,
+      data
+    })
+  },
+  getPointInfo(){
+    return axiosApi({
+      ...apiList.getPointInfo
+    })
+  },
+  clearPlcPoint(point,flag){
+    return axiosApi({
+      method: 'GET',
+      url: `/authority/plc/clearPlcPoint`,
+      data: {point: point,flag:flag}
+    })
+  },
+  resendCommand(id){
     return axiosApi({
-      ...apiList.selectLogs
+      method: 'GET',
+      url: `/authority/plc/resendCommand`,
+      data: {id: id}
     })
   }
 }

+ 76 - 0
imcs-ui/src/api/prepareProductMgr/TTechnologyFile.js

@@ -0,0 +1,76 @@
+import axiosApi from '../AxiosApi.js'
+
+const apiList = {
+  page: {
+    method: 'POST',
+    url:`/authority/tTechnologyFile/page`,
+  },
+  update: {
+    method: 'PUT',
+    url: `/authority/tTechnologyFile`
+  },
+  save: {
+    method: 'POST',
+    url: `/authority/tTechnologyFile`
+  },
+  delete: {
+    method: 'POST',
+    url: `/authority/tTechnologyFile/delete`
+  },
+  upload: {
+    method: 'POST',
+    url: `/authority/tTechnologyFile/upload`
+  },
+  getAllByCondition: {
+    method: 'POST',
+    url: `/authority/tTechnologyFile/getAllByCondition`
+  }
+
+}
+
+export default {
+  page (data) {
+    return axiosApi({
+      ...apiList.page,
+      data
+    })
+  },
+  save (data) {
+    return axiosApi({
+      ...apiList.save,
+      data
+    })
+  },
+  update (data) {
+    return axiosApi({
+      ...apiList.update,
+      data
+    })
+  },
+  delete (data) {
+    return axiosApi({
+      ...apiList.delete,
+      data
+    })
+  },
+  upload (data) {
+    return axiosApi({
+      ...apiList.upload,
+      data
+    })
+  },
+  getAllByCondition (data) {
+    return axiosApi({
+      ...apiList.getAllByCondition,
+      data
+    })
+  },
+  getProgramContent (data) {
+    return axiosApi({
+      method: 'GET',
+      url: `/authority/tTechnologyFile/getProgramContent`,
+      data
+    })
+  },
+
+}

+ 7 - 0
imcs-ui/src/api/statisticalAnalysis/productlineAvailability.js

@@ -180,4 +180,11 @@ export default {
       data:searchObj
     })
   },
+
+  productionLineRate(){
+    return axiosApi({
+      url: `/authority/productLinePerformance/productionLineRate`,
+      method: 'post'
+    })
+  },
 }

BIN
imcs-ui/src/assets/device/liaozhan.jpg


BIN
imcs-ui/src/assets/device/mazak.png


+ 1 - 0
imcs-ui/src/lang/zh/resource.js

@@ -275,6 +275,7 @@ export default {
 			pgVision: '版本号',
 			pgEq: '适合设备',
 			pgUpload: '上传程序',
+      mainPro: '主程序',
 			pgTime: '运行时间',
 			pgSize: '程序大小',
 			pgContent: '程序内容',

+ 6 - 0
imcs-ui/src/lang/zh/zh.js

@@ -360,6 +360,12 @@ export default {
       status: "状态",
       sortValue: "排序"
     },
+    technologyFile: {
+      name: "名称",
+      fileSuffix: "后缀",
+      size: "文件大小",
+      updateTime: "上传时间"
+    },
     area: {
       code: "编码",
       label: "名称",

+ 372 - 34
imcs-ui/src/views/zuihou/dispatchMgr/productLineInfo/Index.vue

@@ -1,62 +1,273 @@
 <template>
   <div class="app-container space">
     <el-row :gutter="12">
-      <el-col :span="12">
+      <el-col :span="14">
         <el-card shadow="always">
-          <div slot="header" class="clearfix">产线运行记录</div>
-          <div v-for="(item, index) in list" :key="index" class="card_content">
+          <div slot="header" class="clearfix">
+            <span>产线运行记录</span>
+            <el-button type="primary" size="mini" @click="getLog()">刷新</el-button>
+          </div>
+          <!-- 列表数据 -->
+          <el-table
+            ref="table"
+            v-loading="loading"
+            :data="tableData.records"
+            border
+            fit
+            row-key="id"
+            style="width: 100%;"
+          >
+            <el-table-column prop="taskNodeName" label='任务名称'  width="120px"> </el-table-column>
+            <el-table-column prop="startStorge" label='开始点位'  width="100px"> </el-table-column>
+            <el-table-column prop="endStorge" label='结束点位' width="100px"></el-table-column>
+            <el-table-column prop="executeTime" label='执行时间' width="160px"></el-table-column>
+            <el-table-column prop="exeStatus" label='执行状态' width="100px">
+              <template slot-scope="{ row }">
+                <el-tag v-if="row.exeStatus == '1'" type="info">待执行</el-tag>
+                <el-tag v-if="row.exeStatus == '2'" type="success">执行中</el-tag>
+                <el-tag v-else >已完成</el-tag>
+              </template>
+            </el-table-column>
+            <el-table-column prop="sendStatus" label='是否下发' width="100px">
+              <template slot-scope="{ row }">
+                <el-tag v-if="row.sendStatus == '1'">已下发</el-tag>
+                <el-tag v-if="row.sendStatus == '0'" type="info">未下发</el-tag>
+              </template>
+            </el-table-column>
+            <el-table-column prop="exeResult" label='执行结果' width="100px">
+              <template slot-scope="{ row }">
+                <el-tag v-if="row.exeResult == '1'" >成功</el-tag>
+                <el-tag v-if="row.exeResult == '0'" >失败</el-tag>
+              </template>
+            </el-table-column>
+            <el-table-column prop="feedback" label='运行时信息' width="160px" show-tooltip-when-overflow></el-table-column>
+            <el-table-column prop="callBack" label='回调信息' width="160px" show-overflow-tooltip></el-table-column>
+          <el-table-column
+              :label="$t('table.operation')"
+              fixed="right"
+              align="center"
+              column-key="operation"
+              width="120px">
+              <template slot-scope="{ row }">
+                <el-button v-if="row.exeStatus === '3' && row.exeResult != '1'" type="danger" @click="resendCommand(row)">指令重发</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+          <pagination
+            v-show="tableData.total > 0"
+            :limit.sync="queryParams.size"
+            :page.sync="queryParams.current"
+            :total="Number(tableData.total)"
+            @pagination="fetch"
+          />
+        </el-card>
+      </el-col>
+      <el-col :span="10">
+        <el-card shadow="hover">
+          <div slot="header" class="clearfix">
+            <span>PLC->PC状态</span>
+            <el-button type="primary" size="mini" @click="getPlcInfo()">刷新</el-button>
+          </div>
+          <div class="card_content">
             <el-form>
               <el-row :gutter="12">
-                <el-col :span="12">
-                  <el-form-item label="订单号:">
-                    <span>{{item.orderNo}}</span>
+                <el-col :span="8">
+                  <el-form-item label="操作模式:">
+                    <span>{{plcInfo['操作模式']}}</span>
                   </el-form-item>
                 </el-col>
-                <el-col :span="12">
-                  <el-form-item label="任务名称:">
-                    <span>{{item.nodeName}}</span>
+                <el-col :span="8">
+                  <el-form-item label="状态:">
+                    <span>{{plcInfo['状态']}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="回零:">
+                    <span>{{plcInfo['回零']}}</span>
                   </el-form-item>
                 </el-col>
               </el-row>
               <el-row :gutter="12">
-                <el-col :span="12">
-                  <el-form-item label="开始库位:">
-                    <span>{{item.startStorge}}</span>
+                <el-col :span="8">
+                  <el-form-item label="源位置:">
+                    <span>{{plcInfo['源位置']}}</span>
                   </el-form-item>
                 </el-col>
-                <el-col :span="12">
-                  <el-form-item label="结束库位:">
-                    <span>{{item.endStorge}}</span>
+                <el-col :span="8">
+                  <el-form-item label="目标位置:">
+                    <span>{{plcInfo['目标位置']}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="执行结果:">
+                    <span>{{plcInfo['运输任务执行结果']}}</span>
                   </el-form-item>
                 </el-col>
               </el-row>
               <el-row :gutter="12">
-                <el-col :span="12">
-                  <el-form-item label="执行状态:">
-                    <span>{{item.exeStatus}}</span>
+                <el-col :span="8">
+                  <el-form-item label="任务类型:">
+                    <span>{{plcInfo['任务类型']}}</span>
                   </el-form-item>
                 </el-col>
-                <el-col :span="12">
-                  <el-form-item label="执行结果:">
-                    <span>{{item.exeResult}}</span>
+                <el-col :span="8">
+                  <el-form-item label="搬运件类型:">
+                    <span>{{plcInfo['搬运件类型']}}</span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+            <hr/>
+            <el-form>
+              <el-row :gutter="12">
+                <el-col :span="8">
+                  <el-form-item label="装载站:">
+                    <span>{{plcInfo['装载站']}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="机床系统1:">
+                    <span>{{plcInfo['机床系统1']}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="机床系统2:">
+                    <span>{{plcInfo['机床系统2']}}</span>
                   </el-form-item>
                 </el-col>
               </el-row>
               <el-row :gutter="12">
-                <el-col :span="12">
-                  <el-form-item label="执行时间:">
-                    <span>{{item.executeTime}}</span>
+                <el-col :span="8">
+                  <el-form-item label="机床系统3:">
+                    <span>{{plcInfo['机床系统3']}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="机床系统4:">
+                    <span>{{plcInfo['机床系统4']}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="机床系统5:">
+                    <span>{{plcInfo['机床系统5']}}</span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="12">
+                <el-col :span="8">
+                  <el-form-item label="清洗系统1:">
+                    <span>{{plcInfo['清洗系统1']}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="清洗系统2:">
+                    <span>{{plcInfo['清洗系统2']}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="清洗系统3:">
+                    <span>{{plcInfo['清洗系统3']}}</span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="12">
+                <el-col :span="8">
+                  <el-form-item label="清洗系统4:">
+                    <span>{{plcInfo['清洗系统4']}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="清洗系统5:">
+                    <span>{{plcInfo['清洗系统5']}}</span>
                   </el-form-item>
                 </el-col>
               </el-row>
             </el-form>
-            <hr/>
           </div>
         </el-card>
-      </el-col>
-      <el-col :span="12">
-        <el-card shadow="hover">
-          <div slot="header" class="clearfix">产线PLC状态</div>
+        <el-card shadow="hover" style="margin-top: 5px">
+          <div slot="header" class="clearfix">PC->PLC状态</div>
+          <div class="card_content">
+            <el-form>
+              <el-row :gutter="12">
+                <el-col :span="8">
+                  <el-form-item label="源位置:">
+                    <span>{{pcInfo['源位置']}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="目标位置:">
+                    <span>{{pcInfo['目标位置']}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="运输任务执行:">
+                    <span>{{pcInfo['运输任务执行']}}</span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="12">
+                <el-col :span="8">
+                  <el-form-item label="任务类型:">
+                    <span>{{pcInfo['任务类型']}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="搬运件类型:">
+                    <span>{{pcInfo['搬运件类型']}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="IPC模式:">
+                    <span>{{pcInfo['IPC模式']}}</span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="12">
+                <el-col :span="8">
+                  <el-form-item label="机床系统1:">
+                    <span>{{pcInfo['机床系统1']}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="机床系统2:">
+                    <span>{{pcInfo['机床系统2']}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="机床系统3:">
+                    <span>{{pcInfo['机床系统3']}}</span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="12">
+                <el-col :span="8">
+                  <el-form-item label="机床系统4:">
+                    <span>{{pcInfo['机床系统4']}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="机床系统5:">
+                    <span>{{pcInfo['机床系统5']}}</span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+          </div>
+        </el-card>
+        <el-card shadow="hover" style="margin-top: 5px">
+          <div slot="header" class="clearfix"><span>PLC清零功能(</span><span style="color: red;font-weight: bold">慎用</span>)</div>
+          <div class="card_content">
+            <el-button type="danger" round @click="clearAll">一键清零</el-button>
+            <br/>
+            <br/>
+            <el-form>
+            <el-form-item label="单点清零:">
+              <el-input v-model="point" placeholder="请输入PLC地址"  size="mini" style="width: 140px"></el-input>
+              <el-button type="primary" round size="mini" @click="clearOne">清零</el-button>
+            </el-form-item>
+            </el-form>
+          </div>
         </el-card>
       </el-col>
     </el-row>
@@ -64,26 +275,153 @@
 </template>
 <script>
 import dispatchMgrApi from "@/api/Dispatch";
+import Pagination from "@/components/Pagination/index.vue";
+import {initQueryParams} from "@/utils/commons";
 export default {
   name: "productLineInfo",
+  components: {Pagination},
   data() {
     return{
-      list: {}
+      list: {},
+      plcInfo: {},
+      pcInfo: {},
+      point: '',
+      loading: false,
+      tableData: {
+        total: 0
+      },
+      queryParams: initQueryParams({}),
     }
   },
   created() {
     this.fetch();
+
   },
   methods: {
     fetch(){
-      dispatchMgrApi
-        .selectLogs()
-        .then((response) => {
+      //查询日志
+      this.getLog();
+      //查询PLC点位信息
+      this.getPlcInfo();
+    },
+    //指令重发
+    resendCommand(row){
+      this.loading = true;
+      this.$confirm("重发指令前请确认好准备工作,如已准备好,点击确认按钮", this.$t('common.tips'), {
+        confirmButtonText: this.$t('common.confirm'),
+        cancelButtonText: this.$t('common.cancel'),
+        type: 'warning'
+      }).then(() => {
+        //查询PLC点位信息
+        dispatchMgrApi.resendCommand(row.id).then((response)=>{
+          const res = response.data;
+          this.loading = false;
+          if(res.isSuccess){
+            this.$message({
+              message:'指令重发成功',
+              type: "success"
+            });
+          }else{
+            this.$message({
+              message:'指令重发失败:' + res.msg,
+              type: "error"
+            });
+          }
+        }).catch(e=>{
+          this.loading = false;
+          this.$message({
+            message:'指令重发失败:' + e.message,
+            type: "error"
+          });
+        })
+      }).catch(() => {
+        this.loading = false;
+        this.$message.info("已取消")
+      })
+
+    },
+    getLog(params = {}){
+      this.loading = true
+      this.queryParams.current = params.current ? params.current : this.queryParams.current
+      this.queryParams.size = params.size ? params.size : this.queryParams.size
+      dispatchMgrApi.selectLogs(this.queryParams).then((response) => {
+        const res = response.data;
+        this.loading = false
+        if(res.isSuccess){
+          this.tableData = res.data
+          this.$message({
+            message:'成功',
+            type: "success"
+          });
+        }else{
+          this.$message({
+            message:'查询失败',
+            type: "error"
+          });
+        }
+      })
+    },
+    getPlcInfo(){
+      //查询PLC点位信息
+      dispatchMgrApi.getPointInfo().then((response)=>{
+        const res = response.data;
+        if(res.isSuccess){
+          this.pcInfo = res.data['pcToPlcMap'];
+          this.plcInfo = res.data['plcToPcMap']
+          this.$message({
+            message:'成功',
+            type: "success"
+          });
+        }
+      }).catch(e=>{
+        this.$message({
+          message:'查询失败' + e.message,
+          type: "error"
+        });
+      })
+    },
+    clearAll(){
+      //一键清零
+      this.clearPlcPoint('1');
+    },
+    clearOne(){
+      if(!this.point){
+        this.$message.error("请输入要清零的地址")
+        return;
+      }
+      //单点清零
+      this.clearPlcPoint('2');
+    },
+    clearPlcPoint(flag){
+      this.$confirm('确认清除PLC地址位数据嘛?请谨慎考虑', this.$t("common.tips"), {
+        confirmButtonText: this.$t("common.confirm"),
+        cancelButtonText: this.$t("common.cancel"),
+        type: "warning"
+      }).then(() => {
+        //清除PLC点位
+        dispatchMgrApi.clearPlcPoint(this.point,flag).then((response)=>{
           const res = response.data;
           if(res.isSuccess){
-            this.list = res.data
+            this.$message({
+              message:'成功',
+              type: "success"
+            });
+            this.getPlcInfo();
+          }else{
+            this.$message({
+              message:'清除失败' + res.msg,
+              type: "error"
+            });
           }
+        }).catch(e=>{
+          this.$message({
+            message:'清除失败' + e.message,
+            type: "error"
+          });
         })
+      }).catch(() => {
+
+      })
     }
   }
 }

+ 454 - 147
imcs-ui/src/views/zuihou/largeScreen/twoDatasModel/Index.vue

@@ -12,7 +12,8 @@
     			&lt;!&ndash; 2D简洁模式 &ndash;&gt;
     			<span @click="boxCardClk('simple')">{{$t("largeScreen.common.data2d")}}</span>-->
     			<!-- 2D数据模式 -->
-    			<span class="tabsActive">{{$t("largeScreen.common.data2shu")}}</span>
+<!--    			<span class="tabsActive">{{$t("largeScreen.common.data2shu")}}</span>-->
+          <img :src="require(`@/assets/logo/tubiao.png`)" style="height: 100px;width: 150px"/>
     		</div>
     		<!-- 全屏 -->
 	    	<div class="battonDiv">
@@ -55,55 +56,19 @@
   					</tr>
   				</table>
   			</div>
-  			<!-- 设备利用率 -->
-		  	<div class="rightDiv marginBottom15">
-		  		<div class="modelTitle marginBottom15">设备利用率</div>
+  			<!-- 设备当日产能 -->
+		  	<div class="rightDiv ">
+		  		<div class="modelTitle marginBottom15">设备当日产能</div>
 		  		<el-row :gutter="15">
-<!--					  <el-col :span="8">
-					  	<div id="percenter1" class="percenter">
-					  		<el-progress type="circle" :percentage="percentages[0]" :stroke-width="10" :width="100"></el-progress>
-					  		<span class="pcText">智能生产保障系统</span>
-					  	</div>
-						<div class="timeTxt">{{ timeSpanList.timeSpanStatistics["智能生产保障系统"] }}分钟</div>
-					  </el-col>
-					  <el-col :span="8">
-					  	<div id="percenter2" class="percenter">
-					  		<el-progress type="circle" :percentage="percentages[1]" color="#5cb87a" :stroke-width="10" :width="100"></el-progress>
-					  		<span class="pcText">框体类加工单元</span>
-					  	</div>
-						  <div class="timeTxt">{{ timeSpanList.timeSpanStatistics["框体类加工单元"] }}分钟</div>
-					  </el-col>-->
 					  <el-col :span="24">
-					  	<div id="percenter3" class="percenter">
+<!--					  	<div id="percenter3" class="percenter">
 					  		<el-progress type="circle" :percentage="percentages[2]" color="#6a5acd" :stroke-width="10" :width="100"></el-progress>
 					  		<span class="pcText">FMS2.0产线</span>
-					  	</div>
-						  <div class="timeTxt">{{ timeSpanList.timeSpanStatistics["FMS2.0产线"] }}分钟</div>
+					  	</div>-->
+              <div id="deviceProduct" class="chart" style="width:100%;height: 300px"></div>
+<!--						  <div class="timeTxt">{{ timeSpanList.timeSpanStatistics["FMS2.0产线"] }}分钟</div>-->
 					  </el-col>
 				</el-row>
-<!--				<el-row :gutter="15">
-						<el-col :span="8">
-						<div id="percenter4" class="percenter" v-show="false">
-					  		<el-progress type="circle" :percentage="percentages[3]" :stroke-width="10" :width="100"></el-progress>
-					  		<span class="pcText">保障中心设备数</span>
-					  	</div>
-						<div class="timeTxt" v-show="false">{{ this.mashingOneList.runData? this.mashingOneList.runData.length: 0}}</div>
-					   </el-col>
-					   <el-col :span="8">
-                        <div id="percenter5" class="percenter">
-					  		<el-progress type="circle" :percentage="percentages[4]" :stroke-width="10" :width="100"></el-progress>
-					  		<span class="pcText">框体类加工设备</span>
-					  	</div>
-						 <div class="timeTxt">{{ this.mashingTwoList.runData? this.mashingTwoList.runData.length:0 }}</div>
-				      </el-col>
-					<el-col :span="8">
-						<div id="percenter6" class="percenter">
-					  		<el-progress type="circle" :percentage="percentages[5]" :stroke-width="10" :width="100"></el-progress>
-					  		<span class="pcText">舱体类加工设备</span>
-					  	</div>
-						<div class="timeTxt">{{ this.mashingThreeList.runData? this.mashingThreeList.runData.length: 0}}</div>
-					</el-col>
-				</el-row>-->
 		  	</div>
   		</el-col>
   		<!-- 中 -->
@@ -184,7 +149,7 @@
 
 		  	</div>
         <div class="centerDiv">
-          <img  :src="require(`@/assets/logo/chanxian.jpg`)" style="width: 100%;">
+          <img  :src="require(`@/assets/logo/machine.png`)" style="width: 100%;height: 400px;">
         </div>
 		  	<!-- 生产计划 -->
 <!--		  	<div class="centerDiv">
@@ -222,7 +187,7 @@
 		  <el-col :span="7">
 		  	<!-- 预警信息 -->
 		  	<div class="rightDiv marginBottom15">
-		  		<div class="modelTitle marginBottom15">报警信息</div>
+		  		<div class="modelTitle marginBottom15">FMS产线设备利用率</div>
 				<!--
 		  		<table class="tableBorder" border="0" cellspacing="0" cellpadding="0">
   					<tr v-for="(item, index) in yujingList" :key="index">
@@ -230,7 +195,7 @@
   						<td>{{ item.name2 }}</td>
   					</tr>
   				</table> -->
-				<vue-seamless-scroll :data="yujingList" class="seamless-warp" :class-option="classOption">
+<!--				<vue-seamless-scroll :data="yujingList" class="seamless-warp" :class-option="classOption">
 					<ul class="item" style="height:160px;">
 						<li class="DataList_top" v-for="(item,index) in yujingList" :key="index">
 							<div class="DataList_col">{{item.itemname}}</div>
@@ -238,19 +203,19 @@
 							<div class="clearfix"></div>
 						</li>
 					</ul>
-				</vue-seamless-scroll>
-
+				</vue-seamless-scroll>-->
+          <div id="containerAlarm" class="chart" style="width:100%;height: 200px"></div>
 		  	</div>
 		  	<!-- 待完成订单 -->
 		  	<div class="rightDiv marginBottom15">
 		  		<div class="modelTitle marginBottom15">待完成订单</div>
 		  		<table class="tableBorder" border="0" cellspacing="0" cellpadding="0" >
   					<tr>
-  						<th>订单号</th>
+  						<th width="120">订单号</th>
   						<th width="80" v-show="false">客户</th>
   						<th width="60">零件数量</th>
   						<th width="50">已生产</th>
-  						<th>交付时间</th>
+  						<th  width="60">交付时间</th>
   						<th width="120">交付倒计时</th>
   					</tr>
   					<tr v-for="(item, index) in diaoduList" :key="index">
@@ -297,8 +262,9 @@
 	  				<li v-for="(item, index) in mashingTwoList.data" :key="index">
 	  					<!--<span class="mStatus" :style="{background:item.controlStatus.background}">{{ item.controlStatusCN}}</span>-->
 	  					<span class="mAudit" :style="{'background':item.productionStatus.background,'color': item.productionStatus.value=='1'?'#666':'#fff'}" >{{item.productionStatusCN}}</span>
-	  					<img class="mashingImg" :src="item.pic" v-lazy="item.pic"  />
-	  					<div class="mashingDiv">
+	  					<img v-if="item.name.includes('VCN-530CL')" class="mashingImg" :src="require(`@/assets/device/mazak.png`)" v-lazy="require(`@/assets/device/mazak.png`)"  />
+              <img v-if="item.name == '装载站'" class="mashingImg" :src="require(`@/assets/device/liaozhan.jpg`)" v-lazy="require(`@/assets/device/liaozhan.jpg`)"  />
+              <div class="mashingDiv">
 	  						<!--<div class="mashingCode">{{ item.productionStatusCN }}</div>-->
 	  						<div class="mashingName">{{ item.name }}</div>
 	  					</div>
@@ -312,6 +278,8 @@
 </template>
 
 <script>
+
+import 'echarts-liquidfill'
 	// Echarts的组件
 	import * as echarts from 'echarts'
 	// 引入vuescroll
@@ -336,7 +304,8 @@
 
 	// 加载动态数字组件
 	import countTo from 'vue-count-to'
-
+  // 【产品加工汇总】-API
+  import productlineAvailabilityApi from "@/api/statisticalAnalysis/productlineAvailability";
 	export default {
 	  name: "TwoDatasModel",
 	  directives: { elDragDialog },
@@ -410,9 +379,9 @@
 	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
 	  created() {
 	  	// 初始化数据
-		initDicts(['RUN_MODE'], this.dicts)
+		  initDicts(['RUN_MODE'], this.dicts)
 	  	this.initDatas()
-		this.getDatas()
+		  this.getDatas()
 		},
 		watch: {
 	  	    websocketMsg(curVal, oldVal) {
@@ -530,11 +499,11 @@
 
 
 		    //维保数据
-			let repairParams = initQueryParams({})
-		   //this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
+			  let repairParams = initQueryParams({})
+		    //this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
 	       //this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
-			repairParams.size = 5
-			repairApi.page(repairParams).then(res => {
+			  repairParams.size = 5
+			  repairApi.page(repairParams).then(res => {
 			    //console.log(res)
 				if (res.status == 200 && res.data.isSuccess) {
 					 this.weibaoList = res.data.data.records
@@ -546,7 +515,7 @@
                 }
 			})
 
-            orderMgrApi.orderStatitcs().then(res=> {
+        orderMgrApi.orderStatitcs().then(res=> {
 				if (res.status == 200 && res.data.isSuccess) {
 					 //更新执行时间和合格率
 					 this.allDatas = [parseInt(res.data.data.lastHour.rate), parseFloat(res.data.data.tadayRate.rate)>0?parseFloat(res.data.data.tadayRate.rate)>0:100, parseFloat(res.data.data.weekRate.rate)>0?parseFloat(res.data.data.weekRate.rate):100]
@@ -559,18 +528,22 @@
                 }
 			})
 
-			//产线统计时长数据
-            areaMgrApi.getTimeSpanList({}).then(res=>{
+			  //产线统计时长数据
+        areaMgrApi.getTimeSpanList({}).then(res=>{
 				if (res.status == 200 && res.data.isSuccess) {
 					this.timeSpanList = res.data.data
 					this.timeSpanList.timeSpanStatistics["智能生产保障系统"] = this.timeSpanList.timeSpanStatistics["智能生产保障系统"]>0? this.timeSpanList.timeSpanStatistics["智能生产保障系统"]: 254
 					this.timeSpanList.timeSpanStatistics["框体类加工单元"] = this.timeSpanList.timeSpanStatistics["框体类加工单元"]>0? this.timeSpanList.timeSpanStatistics["框体类加工单元"]: 839
-					this.timeSpend = this.timeSpanList.timeSpanStatistics["智能生产保障系统"]+this.timeSpanList.timeSpanStatistics["框体类加工单元"] + this.timeSpanList.timeSpanStatistics["舱体类加工单元"]
+					this.timeSpend = this.timeSpanList.timeSpanStatistics["FMS2.0"]
+          console.log(this.timeSpend  + "----");
+          if(this.timeSpend == '0' || this.timeSpend == 0){
+            this.timeSpend = 0
+          }
 				}
 			})
 
-			//设备资源数据
-	        areaMgrApi.iconGroupList({resourceStatus:"1",group:0}).then(res => {
+			  //设备资源数据
+	      areaMgrApi.iconGroupList({resourceStatus:"1",group:0}).then(res => {
 				//console.log(res)
 				if (res.status == 200 && res.data.isSuccess) {
 				    this.mashingTwoList = this.filterResource(res.data.data.iconGroupList[0], true)
@@ -606,6 +579,29 @@
 					})
                 }
 	        })
+
+        //查询设备当日产出
+        productlineAvailabilityApi.deviceResourceSum(1, 5, {})
+        .then((response) => {
+          const res = response.data;
+          let tableData = (res.data || []).records;
+          this.totalNum = 0
+          let data = new Map()
+          if(tableData && tableData.length > 0){
+            tableData.forEach(item => {
+                data[item.resourceName] = item.totalNum;
+                this.deviceProductInfo(data);
+            })
+          }else{
+            this.deviceProductInfo(data);
+          }
+        });
+
+      productlineAvailabilityApi.productionLineRate().then((response) => {
+        const value = response.data.data ? Number(response.data.data) : 0;
+
+        this.alarm(value);
+      })
 		},
 	  	initDatas(){
 
@@ -741,96 +737,118 @@
 	  	// 推送接收到的数据
 	  	openMessageTips(data){
 	  		// 如果是【数据模式】
-		  if(this.$route.fullPath.indexOf("/largeScreen/twoDatasModel") > -1){
-			  console.log("接收websocket的推送信息 == ",data)
-			  if(data.type == 'PUSH_TYPE_DATA_SCREEN'){
-					this.$nextTick(()=> {
-						// 数据变更
-						//this.initPercentPie([randomFloor(77,87), randomFloor(59,69), randomFloor(49,69)])
-						this.orderDatas = data.data.zoneMap.zoneData
-						this.runDatas = data.data.planMap.planData.records.slice(0,5)
-
-						//合格率和工时时长信息更新
-                        this.allDatas = [parseInt(data.data.orderStatistics.lastHour.rate), parseFloat(data.data.orderStatistics.tadayRate.rate)>0?parseFloat(data.data.orderStatistics.tadayRate.rate):100, parseFloat(data.data.orderStatistics.weekRate.rate)>0?parseFloat(data.data.orderStatistics.weekRate.rate):100]
-
-						this.timeSpanList.validTimeSpanStatistics = data.data.validTimeSpanStatistics>0? data.data.validTimeSpanStatistics: 568
-						this.timeSpanList.timeSpanStatistics = data.data.timeSpanStatistics
-						this.timeSpanList.timeSpanStatistics["智能生产保障系统"] = this.timeSpanList.timeSpanStatistics["智能生产保障系统"]>0? this.timeSpanList.timeSpanStatistics["智能生产保障系统"]: 254
+		    if(this.$route.fullPath.indexOf("/largeScreen/twoDatasModel") > -1){
+			    console.log("接收websocket的推送信息 == ",data)
+			    if(data.type == 'PUSH_TYPE_DATA_SCREEN'){
+					  this.$nextTick(()=> {
+						  // 数据变更
+						  //this.initPercentPie([randomFloor(77,87), randomFloor(59,69), randomFloor(49,69)])
+						  this.orderDatas = data.data.zoneMap.zoneData
+						  this.runDatas = data.data.planMap.planData.records.slice(0,5)
+
+						  //合格率和工时时长信息更新
+              this.allDatas = [parseInt(data.data.orderStatistics.lastHour.rate), parseFloat(data.data.orderStatistics.tadayRate.rate)>0?parseFloat(data.data.orderStatistics.tadayRate.rate):100, parseFloat(data.data.orderStatistics.weekRate.rate)>0?parseFloat(data.data.orderStatistics.weekRate.rate):100]
+
+						  this.timeSpanList.validTimeSpanStatistics = data.data.validTimeSpanStatistics>0? data.data.validTimeSpanStatistics: 568
+						  this.timeSpanList.timeSpanStatistics = data.data.timeSpanStatistics
+						  this.timeSpanList.timeSpanStatistics["智能生产保障系统"] = this.timeSpanList.timeSpanStatistics["智能生产保障系统"]>0? this.timeSpanList.timeSpanStatistics["智能生产保障系统"]: 254
 					    this.timeSpanList.timeSpanStatistics["框体类加工单元"] = this.timeSpanList.timeSpanStatistics["框体类加工单元"]>0? this.timeSpanList.timeSpanStatistics["框体类加工单元"]: 839
-						this.timeSpend = this.timeSpanList.timeSpanStatistics["智能生产保障系统"]+this.timeSpanList.timeSpanStatistics["框体类加工单元"] + this.timeSpanList.timeSpanStatistics["舱体类加工单元"]
-
-
-						this.diaoduList = data.data.orderMap.orderData.records
-						this.incomplete = 0
-						for(let i = 0; i < this.diaoduList.length; i++){
-							if(this.diaoduList[i].completeNum == null){
-								this.incomplete += parseInt(this.diaoduList[i].productNum)
-							}else{
-								this.incomplete += parseInt(this.diaoduList[i].productNum) - parseInt(this.diaoduList[i].completeNum)
-							}
-				        }
-						this.weibaoList = []
-						this.weibaoList = data.data.repairMap.repairData.records
-
-						 this.mashingOneList = this.filterResource(data.data.groupMap.iconGroupList[0], true)
-						 this.mashingTwoList = this.filterResource(data.data.groupMap.iconGroupList[1], false)
-						 this.mashingThreeList = this.filterResource(data.data.groupMap.iconGroupList[2], false)
-
-						 //计算设备利用率
-						 //this.initPercentPie([parseInt(100 * this.mashingOneList.runData.length / this.mashingOneList.data.length),
-						 // parseInt(100 * this.mashingTwoList.runData.length / this.mashingTwoList.data.length), parseInt(100 * this.mashingThreeList.runData.length / this.mashingThreeList.data.length)])
-                         if(this.timeSpend>0){
-						 	this.initPercentPie([parseInt(100* this.timeSpanList.timeSpanStatistics["智能生产保障系统"]/ this.timeSpend),
+						  this.timeSpend = this.timeSpanList.timeSpanStatistics["FMS2.0"]
+              if(this.timeSpend == '0' || this.timeSpend == 0){
+                this.timeSpend = 102;
+              }
+
+						  this.diaoduList = data.data.orderMap.orderData.records
+						  this.incomplete = 0
+						  for(let i = 0; i < this.diaoduList.length; i++){
+							  if(this.diaoduList[i].completeNum == null){
+								  this.incomplete += parseInt(this.diaoduList[i].productNum)
+							  }else{
+								  this.incomplete += parseInt(this.diaoduList[i].productNum) - parseInt(this.diaoduList[i].completeNum)
+							  }
+              }
+						  this.weibaoList = []
+						  this.weibaoList = data.data.repairMap.repairData.records
+
+						  this.mashingOneList = this.filterResource(data.data.groupMap.iconGroupList[0], true)
+						  this.mashingTwoList = this.filterResource(data.data.groupMap.iconGroupList[1], false)
+						  this.mashingThreeList = this.filterResource(data.data.groupMap.iconGroupList[2], false)
+
+						  //计算设备利用率
+						  //this.initPercentPie([parseInt(100 * this.mashingOneList.runData.length / this.mashingOneList.data.length),
+						  // parseInt(100 * this.mashingTwoList.runData.length / this.mashingTwoList.data.length), parseInt(100 * this.mashingThreeList.runData.length / this.mashingThreeList.data.length)])
+              if(this.timeSpend>0){
+						    	this.initPercentPie([parseInt(100* this.timeSpanList.timeSpanStatistics["智能生产保障系统"]/ this.timeSpend),
 					     		parseInt(100 * this.timeSpanList.timeSpanStatistics["框体类加工单元"] / this.timeSpend), parseInt(100 * this.timeSpanList.timeSpanStatistics["舱体类加工单元"]  / this.timeSpend),
-								parseInt(100 * this.mashingOneList.runData.length / this.mashingOneList.data.length),parseInt(100 * this.mashingTwoList.runData.length / this.mashingTwoList.data.length), parseInt(100 * this.mashingThreeList.runData.length / this.mashingThreeList.data.length)
-				    		])
-					      }else{
-							this.initPercentPie([0,0,0,parseInt(100 * this.mashingOneList.runData.length / this.mashingOneList.data.length),parseInt(100 * this.mashingTwoList.runData.length / this.mashingTwoList.data.length), parseInt(100 * this.mashingThreeList.runData.length / this.mashingThreeList.data.length)
+								  parseInt(100 * this.mashingOneList.runData.length / this.mashingOneList.data.length),parseInt(100 * this.mashingTwoList.runData.length / this.mashingTwoList.data.length), parseInt(100 * this.mashingThreeList.runData.length / this.mashingThreeList.data.length)
+				    		  ])
+					    }else{
+							  this.initPercentPie([0,0,0,parseInt(100 * this.mashingOneList.runData.length / this.mashingOneList.data.length),parseInt(100 * this.mashingTwoList.runData.length / this.mashingTwoList.data.length), parseInt(100 * this.mashingThreeList.runData.length / this.mashingThreeList.data.length)
 				    		])
 						  }
 
-						 let runLen = this.mashingOneList.runData.length + this.mashingTwoList.runData.length + this.mashingThreeList.runData.length;
-						 this.mashingTwoList.data = this.mashingTwoList.data.concat(this.mashingThreeList.data).concat(this.mashingOneList.data)
+						  let runLen = this.mashingOneList.runData.length + this.mashingTwoList.runData.length + this.mashingThreeList.runData.length;
+						  this.mashingTwoList.data = this.mashingTwoList.data.concat(this.mashingThreeList.data).concat(this.mashingOneList.data)
 
-						 //this.gaugeData = {value : parseFloat(runLen/this.mashingTwoList.data.length).toFixed(2), name:"效率"}
-                         this.gaugeData = {value:randomFloor(60,75)/100, name:"效率"}
-						 this.$refs.gauge.dispose()
-						 this.$refs.gauge.initChart(this.gaugeData)
+						  //this.gaugeData = {value : parseFloat(runLen/this.mashingTwoList.data.length).toFixed(2), name:"效率"}
+              this.gaugeData = {value:randomFloor(60,75)/100, name:"效率"}
+						  this.$refs.gauge.dispose()
+						  this.$refs.gauge.initChart(this.gaugeData)
 
-						 let datas = data.data.warnMap.warnData.records
-						 let that = this
-						 this.yujingList = datas.map((data)=>{
-						    let msg = data.feedback ? data.feedback : " 响应超时 ";
+						  let datas = data.data.warnMap.warnData.records
+						  let that = this
+						  this.yujingList = datas.map((data)=>{
+						  let msg = data.feedback ? data.feedback : " 响应超时 ";
 							let arr = data.createTime;
 							let time = arr[0] + "-" + arr[1] + "-" + arr[2] + "\t" + arr[3] + ":" + arr[4];
 							let itemname = ""
 							if(data.taskNodeId){
-                                itemname = "["+ data.resourceName +"] "+data.procedureName+"("+data.instructionName+")" + msg;
+                itemname = "["+ data.resourceName +"] "+data.procedureName+"("+data.instructionName+")" + msg;
 							}else{
-                                //itemname = "[监控推送]" + msg;
+                //itemname = "[监控推送]" + msg;
 								itemname = ""+ msg;
 							}
-                            if(data.status == '0'){
-
-							    setTimeout(function(){
-								    that.$notify({
-								    title: '预警提示',
-									message: itemname + "\t" + "请管理人员去产线查看",
-									type: 'warning',
-									position: 'bottom-right',
-									duration: 5000,
-									customClass:'notifyStyle',
-								   });
+              if(data.status == '0'){
+							  setTimeout(function(){
+                  that.$notify({
+                    title: '预警提示',
+                    message: itemname + "\t" + "请管理人员去产线查看",
+                    type: 'warning',
+                    position: 'bottom-right',
+                    duration: 5000,
+                    customClass:'notifyStyle',
+                  });
 								},8000);
 							}
-						    return {itemname:itemname , time: time}
+              return {itemname:itemname , time: time}
 						 });
 						 this.yujingList = []
-
-
-					})
+					  })
 			    }
-		  	  }
+        }
+
+        //查询设备当日产出
+        productlineAvailabilityApi.deviceResourceSum(1, 5, {})
+          .then((response) => {
+            const res = response.data;
+            let tableData = (res.data || []).records;
+            this.totalNum = 0
+            let data = new Map()
+            if(tableData && tableData.length > 0){
+              tableData.forEach(item => {
+                data[item.resourceName] = item.totalNum;
+                this.deviceProductInfo(data);
+              })
+            }else{
+              this.deviceProductInfo(data);
+            }
+          });
+
+        productlineAvailabilityApi.productionLineRate().then((response) => {
+          const value = response.data.data ? Number(response.data.data) : 0;
+
+          this.alarm(value);
+        })
 	  	},
 	  	// 组件销毁的时候,关闭websocket连接
 	  	websocketClose() {
@@ -850,12 +868,13 @@
 
 		// 过滤设备数据
 		filterResource(mashingList, bool){
+      if(!mashingList || !mashingList.data) return mashingList;
 		   let arr = mashingList.data.filter((data) => {
 			   return data.name.indexOf("接驳位") <0 && data.name.indexOf("托板") < 0 && data.name.indexOf("上下料站") < 0
 			          && data.name.indexOf("线边库") <0 && data.name.indexOf("立库") <0 && data.name.indexOf("三坐标") && data.name.indexOf("打标机") && data.name.indexOf("机器人") < 0
            });
 		   mashingList.data = arr
-      console.log("mashingList.data:" + JSON.stringify(mashingList.data))
+
 		   if(bool){
 			    mashingList.runData = arr.filter((data)=> { return data.todoTaskcount>0});
 		   }else{
@@ -922,8 +941,8 @@
 	    	})
 	    },
 
-        //时间差转换
-        formatGap(date) {
+      //时间差转换
+      formatGap(date) {
 		    let staytimeGap = new Date(date).getTime() - new Date().getTime();
 			if(staytimeGap<0){
 				staytimeGap = new Date().getTime() - new Date(date).getTime();
@@ -938,20 +957,305 @@
 			return [Number(parseFloat(stayDay/30*100).toFixed(2)), stayDay + "天" +stayHour + "小时" + stayMin + "分"]
 		},
 
-	   // 设置进度文本内容
-	   setItemText(text){
+      // 设置进度文本内容
+	    setItemText(text){
 	       return () => {
 		        return this.formatGap(text)[1]
 			}
 	    },
-		expireText(text){
+		  expireText(text){
            return () => {
 		        return "过期" + this.formatGap(text)[1]
 		   }
 	   },
-       setPercentage(text){
+      setPercentage(text){
 			return this.formatGap(text)[0]>100? 100 : this.formatGap(text)[0]
-	    }
+	    },
+      //水球图
+      alarm(value){
+        value = value == 0 ? 0 : value;
+        this.myChartThree = echarts.init(document.getElementById('containerAlarm'));
+        var option = {
+          title: [
+            {
+              text: value * 100 + '%',
+              top: '40%',
+              left: '46%',
+              textStyle: {
+                fontSize: '40',
+                fontWeight: '300',
+                color: '#fff'
+              }
+            }
+          ],
+          series: [
+            {
+              name: '最外层-虚线',
+              type: 'gauge',
+              radius: '97%',
+              center: ['58%', '50%'],
+              startAngle: 0,
+              endAngle: 360,
+              axisLine: {
+                show: false
+              },
+              axisTick: {
+                distance: -6,
+                length: 2,
+                lineStyle: {
+                  color: '#2AECFF',
+                  width: 5,
+                  type: [20],
+                  dashOffset: 19,
+                  opacity: 0.8
+                },
+                splitNumber: 6
+              },
+              splitLine: {
+                show: false
+              },
+              axisLabel: {
+                show: false
+              },
+              pointer: {
+                show: false
+              }
+            },
+            {
+              type: 'liquidFill',
+              radius: '85%',
+              z: 5,
+              center: ['58%', '50%'],
+              amplitude: 14,
+              backgroundStyle: {
+                color: '#0d2d42'
+              },
+              color: [
+                {
+                  type: 'linear',
+                  x: 0,
+                  y: 0,
+                  x2: 0,
+                  y2: 1,
+                  colorStops: [
+                    {
+                      offset: 1,
+                      color: '#0061A2'
+                    },
+                    {
+                      offset: 0,
+                      color: '#00FFE5'
+                    }
+                  ],
+                  globalCoord: false
+                },
+                {
+                  type: 'linear',
+                  x: 0,
+                  y: 0,
+                  x2: 0,
+                  y2: 1,
+                  colorStops: [
+                    {
+                      offset: 1,
+                      color: '#0061A2'
+                    },
+                    {
+                      offset: 0,
+                      color: '#00FFE5'
+                    }
+                  ],
+                  globalCoord: false
+                },
+                {
+                  type: 'linear',
+                  x: 0,
+                  y: 0,
+                  x2: 0,
+                  y2: 1,
+                  colorStops: [
+                    {
+                      offset: 1,
+                      color: '#0061A2'
+                    },
+                    {
+                      offset: 0,
+                      color: '#00FFE5'
+                    }
+                  ],
+                  globalCoord: false
+                }
+              ],
+              data: [
+                value + 0.02,
+                {
+                  value: value - 0.01,
+                  direction: 'left'
+                },
+                value - 0.01
+              ],
+              label: {
+                normal: {
+                  formatter: ''
+                }
+              },
+              outline: {
+                show: true,
+                borderDistance: 0,
+                itemStyle: {
+                  borderWidth: 2,
+                  borderColor: '#2AECFF'
+                }
+              }
+            }
+          ]
+        };
+
+
+        this.myChartThree.setOption(option);
+
+      },
+      //设备产能柱状图
+      deviceProductInfo(data){
+        this.myChartFour = echarts.init(document.getElementById('deviceProduct'));
+        let xData = ['VCN-530CL-01', 'VCN-530CL-02', 'VCN-530CL-03', 'VCN-530CL-04', 'VCN-530CL-05'];
+        var yData = [];
+
+        xData.forEach(item=>{
+          yData.push(data[item] ? data[item] : 0);
+        })
+        var option = {
+          grid: {
+            top: '10%',
+            left: '0px',
+            bottom: '0px',
+            right: '0px',
+            containLabel: true,
+          },
+          tooltip: {
+            trigger: 'item',
+          },
+          animation: false,
+          xAxis: [
+            {
+              type: 'category',
+              data: xData,
+              axisTick: {
+                alignWithLabel: true,
+              },
+              axisLine: {
+                show: false,
+              },
+              axisLabel: {
+                textStyle: {
+                  color: '#ddd',
+                },
+                margin: 30,
+              },
+              interval: 1,
+            },
+          ],
+          yAxis: [
+            {
+              show: true,
+              type: 'value',
+
+            },
+          ],
+          series: [
+            {
+              name: '上部圆',
+              type: 'pictorialBar',
+              silent: true,
+              symbolSize: [40, 10],
+              symbolOffset: [0, -6],
+              symbolPosition: 'end',
+              z: 12,
+              label: {
+                normal: {
+                  show: true,
+                  position: 'top',
+                  fontSize: 15,
+                  fontWeight: 'bold',
+                  color: '#5BFCF4',
+                },
+              },
+              color: '#5BFCF4',
+              data: yData,
+            },
+            {
+              name: '底部圆',
+              type: 'pictorialBar',
+              silent: true,
+              symbolSize: [40, 10],
+              symbolOffset: [0, 7],
+              z: 12,
+              color: '#5BFCF4',
+              data: yData,
+            },
+            {
+              name: '内层波浪',
+              type: 'pictorialBar',
+              silent: true,
+              symbolSize: [50, 15],
+              symbolOffset: [0, 12],
+              z: 10,
+              itemStyle: {
+                normal: {
+                  color: 'transparent',
+                  borderColor: '#5BFCF4',
+                  borderType: 'solid',
+                  borderWidth: 8,
+                },
+              },
+              data: yData,
+            },
+            {
+              name: '外层波浪',
+              type: 'pictorialBar',
+              silent: true,
+              symbolSize: [70, 20],
+              symbolOffset: [0, 18],
+              z: 10,
+              itemStyle: {
+                normal: {
+                  color: 'transparent',
+                  borderColor: 'rgba(91,252,244,0.5)',
+                  borderType: 'solid',
+                  borderWidth: 5,
+                },
+              },
+              data: yData,
+            },
+            {
+              name: '设备数量',
+              type: 'bar',
+              barWidth: '40',
+              barGap: '10%', // Make series be overlap
+              barCateGoryGap: '10%',
+              itemStyle: {
+                normal: {
+                  color: new echarts.graphic.LinearGradient(0, 0, 0, 0.7, [
+                    {
+                      offset: 0,
+                      color: 'rgba(210,210,210,0.3)',
+                    },
+                    {
+                      offset: 1,
+                      color: '#5BFCF4',
+                    },
+                  ]),
+                  opacity: 0.8,
+                },
+              },
+              data: yData,
+            },
+          ],
+        };
+
+        this.myChartFour.setOption(option);
+
+      }
 	  }
 	}
 </script>
@@ -1012,7 +1316,8 @@
 			font-weight: bold;
 			color: #28BDE0;
 			bottom: 20px;
-			left: 0;
+			left: 20px;
+      top: 5px;
 			span {
 				cursor: pointer;
 				margin-right: 20px;
@@ -1099,7 +1404,9 @@
 						border-radius: 50%;
 					}
 					.mashingName {
-						text-align: left;
+						text-align: center;
+            font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;
+            color: #f5e84d;
 					}
 				}
 			}

+ 8 - 3
imcs-ui/src/views/zuihou/lineSideLibrary/lineSideEmulate/Index.vue

@@ -65,7 +65,7 @@
 	  					<td v-for="objTd in objTr.stockList" :key="objTd.id" :class="objTd.storgeStockCount>0 ? 'blueBg' : ''" @click="editOne(objTd)">
 	  						{{objTd.no}}
 	  						<el-image v-if="objTd.lockStatus == '0'" class="locked" :src="resolveLogo(lockImg)" fit="contain"></el-image>
-	  					</td>	  					
+	  					</td>
 	  				</tr>
 	  				<!--
 	  				<tr>
@@ -193,7 +193,7 @@
   		</div>-->
 
   	</div>
-		
+
     <tenant-edit
       ref="edit"
       :dialog-visible="dialog.isVisible"
@@ -385,7 +385,7 @@
 	    editOne(row) {
 	    	this.edit(row);
 	    },
-	    edit (row) {		  
+	    edit (row) {
 	      this.$refs.edit.setTenant(row, this.dicts)
 	      this.$refs.edit.type = "edit"
 	      this.dialog.title = this.$t("lineSide.common.libProd")
@@ -635,7 +635,9 @@
 		text-align: center;
 		width: 100%;
 		padding: 7px 0;
+    box-shadow: 5px 5px 5px #c0b7b7;
 		border: 1px solid #AAAAAA;
+    font-size: 12px;
 	}
 	.footerDiv a{
 		display: inline-block;
@@ -683,13 +685,16 @@
 	}
 	.contentDiv{
 		margin: 10px 0;
+    box-shadow: 5px 5px 5px #c0b7b7;
 		border-left: 1px solid #AAAAAA;
 		border-top: 1px solid #AAAAAA;
 	}
 	.contentDiv tr td{
 		position: relative;
 		cursor: pointer;
+    font-size: 11px;
 		padding: 10px 25px;
+    box-shadow: 5px 5px 5px 5px #c0b7b7;
 		border-right: 1px solid #AAAAAA;
 		border-bottom: 1px solid #AAAAAA;
 	}

+ 26 - 0
imcs-ui/src/views/zuihou/machiningClient/touchScreen/Index.vue

@@ -8,7 +8,11 @@
     <!-- 全屏 -->
     <el-row :gutter="20" class="rowCls">
       <div class="headerBg">
+
         <h2>现场工控端</h2>
+        <div class="tabsDiv">
+        <img :src="require(`@/assets/logo/tubiao.png`)" style="height: 80px;width: 130px"/>
+      </div>
         <div class="battonDiv">
           <el-tooltip
             v-if="!isFullSreen"
@@ -676,4 +680,26 @@ export default {
 .el-table__expanded-cell {
   background-color: transparent;
 }
+
+.headerBg{
+  .tabsDiv{
+    position: absolute;
+    font-size: 17px;
+    font-weight: bold;
+    color: #28BDE0;
+    bottom: 20px;
+    left: 40px;
+    top: 5px;
+    span {
+      cursor: pointer;
+      margin-right: 20px;
+    }
+    span:hover{
+      opacity: 0.7;
+    }
+    .tabsActive{
+      color: #FFFFFF;
+    }
+  }
+}
 </style>

+ 127 - 0
imcs-ui/src/views/zuihou/prepareProductMgr/technologyFile/Edit.vue

@@ -0,0 +1,127 @@
+<template>
+  <el-dialog :close-on-click-modal="false" :close-on-press-escape="true" :title="title" :type="type" :visible.sync="isVisible" :width="width" top="50px">
+      <el-upload
+        class="upload-demo"
+        :headers="headers"
+        :action="action"
+        :data="fileOtherData"
+        :on-preview="handlePreview"
+        :on-remove="handleRemove"
+        :before-remove="beforeRemove"
+        :on-error='handleError'
+        :on-exceed="handleExceed"
+        :on-success="handleSuccess"
+        :file-list="fileList">
+        <el-button size="small" type="primary">点击上传</el-button>
+        <div slot="tip" class="el-upload__tip">只能上传EIA后缀文件,且不超过10MB</div>
+      </el-upload>
+  </el-dialog>
+</template>
+<script>
+import tTechnologyFile from '@/api/prepareProductMgr/TTechnologyFile.js'
+import db from "@/utils/localstorage";
+import {Base64} from "js-base64";
+
+
+export default {
+  name: 'tTechnologyFileEdit',
+  components: {},
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false
+    },
+    type: {
+      type: String,
+      default: 'add'
+    }
+  },
+  data () {
+    return {
+      screenWidth: 0,
+      width: this.initWidth(),
+      fileList: [],
+      // 附件上传
+      action: `${process.env.VUE_APP_BASE_API}/authority/tTechnologyFile/upload`,
+      // 附件其它参数
+      fileOtherData: {
+        id: "",
+        mainFlag: 1
+      },
+    }
+  },
+  computed: {
+    headers() {
+      return {
+        token: 'Bearer ' + db.get("TOKEN", ""),
+        tenant: db.get("TENANT", "") || "",
+        Authorization: `Basic ${Base64.encode(`${process.env.VUE_APP_CLIENT_ID}:${process.env.VUE_APP_CLIENT_SECRET}`)}`
+      };
+    },
+    isVisible: {
+      get () {
+        return this.dialogVisible
+      },
+      set () {
+        this.close()
+      }
+    },
+    title () {
+      return this.type === 'add' ? this.$t('common.add') : this.$t('common.edit')
+    }
+  },
+  watch: {
+
+  },
+  mounted () {
+    window.onresize = () => {
+      return (() => {
+        this.width = this.initWidth()
+      })()
+    }
+  },
+  methods: {
+    initWidth () {
+      this.screenWidth = document.body.clientWidth
+      if (this.screenWidth < 991) {
+        return '90%'
+      } else if (this.screenWidth < 1400) {
+        return '45%'
+      } else {
+        return '800px'
+      }
+    },
+    setDictionary(row){
+      if(row && row.id){
+        this.fileOtherData.id = row.id
+      }
+    },
+    close () {
+      this.fileList = [],
+      this.$emit('close')
+    },
+    // 文件上传失败时的钩子
+    handleError(err, file, fileList){
+      this.$message.error("文件上传失败~" + err)
+    },
+    handleRemove(file, fileList) {
+      console.log(file, fileList);
+    },
+    handlePreview(file) {
+      console.log(file);
+    },
+    beforeRemove(file, fileList) {
+      return this.$confirm(`确定移除 ${ file.name }?`);
+    },
+    handleExceed(){
+
+    },
+    handleSuccess(){
+      this.fileOtherData.id = ''
+      this.$emit('close')
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+</style>

+ 63 - 0
imcs-ui/src/views/zuihou/prepareProductMgr/technologyFile/Index.vue

@@ -0,0 +1,63 @@
+<template>
+  <div class="app-container">
+    <el-row :gutter="10">
+      <el-col :sm="12" :xs="24">
+        <el-card class="box-card">
+          <div class="clearfix" slot="header">
+            <span>主程序列表</span>
+          </div>
+          <technology-file @technologyFileClick="technologyFileClick" @resetItem="resetItem" ref="dictionary" />
+        </el-card>
+      </el-col>
+      <el-col :sm="12" :xs="24">
+        <el-card class="box-card">
+          <div class="clearfix" slot="header">
+            <span>子程序列表</span>
+          </div>
+          <technology-file-item ref="TechnologyFileItem" />
+        </el-card>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import TechnologyFile from './TechnologyFile.vue'
+import TechnologyFileItem from './TechnologyFileItem.vue'
+
+export default {
+  name: 'DictionaryManage',
+  components: { TechnologyFile, TechnologyFileItem },
+  filters: {
+
+  },
+  data () {
+    return {
+
+    }
+  },
+  computed: {
+
+  },
+  watch: {
+
+  },
+  mounted () {
+
+
+  },
+  methods: {
+    technologyFileClick (row) {
+      this.$refs.TechnologyFileItem.technologyFileClick(row)
+    },
+    resetItem () {
+      this.$refs.TechnologyFileItem.technologyFileClick({ id: -1 })
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.el-card /deep/ .el-card__body {
+  padding: 0px;
+}
+</style>

+ 265 - 0
imcs-ui/src/views/zuihou/prepareProductMgr/technologyFile/TechnologyFile.vue

@@ -0,0 +1,265 @@
+<template>
+  <div class="app-container">
+    <div class="filter-container">
+      <el-input :placeholder="$t('table.technologyFile.name')" size="small" class="filter-item search-item"
+                v-model="queryParams.model.name"/>
+      <el-button @click="search" class="filter-item" plain type="primary" size="small">{{ $t('table.search') }}</el-button>
+      <el-button @click="reset" class="filter-item" plain type="warning" size="small">{{ $t('table.reset') }}</el-button>
+      <el-dropdown class="filter-item" trigger="click"
+                   v-has-any-permission="['dict:delete','dict:export', 'dict:import']">
+        <el-button size="small">
+          {{ $t('table.more') }}
+          <i class="el-icon-arrow-down el-icon--right"/>
+        </el-button>
+        <el-dropdown-menu slot="dropdown">
+          <el-dropdown-item @click.native="add" v-has-permission="['dict:add']">
+            {{ $t('table.add') }}
+          </el-dropdown-item>
+          <el-dropdown-item @click.native="batchDelete" v-has-permission="['dict:delete']">
+            {{ $t('table.delete') }}
+          </el-dropdown-item>
+        </el-dropdown-menu>
+      </el-dropdown>
+    </div>
+
+    <el-table
+      highlight-current-row
+      :data="tableData.records"
+      :key="tableKey"
+      @filter-change="filterChange"
+      @row-click="rowClick"
+      @selection-change="onSelectChange"
+      @sort-change="sortChange"
+      border fit row-key="id"
+      ref="table"
+      size="mini"
+      style="width: 100%;"
+      v-loading="loading"
+    >
+      <el-table-column align="center" type="selection" width="40px" :reserve-selection="true"/>
+      <el-table-column :label="$t('table.technologyFile.name')" :show-overflow-tooltip="true" align="center" prop="type">
+        <template slot-scope="scope">
+          <span>{{ scope.row.name }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('table.technologyFile.fileSuffix')" :show-overflow-tooltip="true" align="center" prop="name">
+        <template slot-scope="scope">
+          <span>{{ scope.row.fileSuffix }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('table.technologyFile.size')" :show-overflow-tooltip="true" align="center"
+                       prop="describe">
+        <template slot-scope="scope">
+          <span>{{ scope.row.size +  scope.row.unit }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('table.technologyFile.updateTime')"  align="center" prop="createTime" width="170px">
+        <template slot-scope="scope">
+          <span>{{ scope.row.updateTime }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('table.operation')" align="center" class-name="small-padding fixed-width"
+                       width="100px">
+        <template slot-scope="{row}">
+          <i @click="edit(row)" class="el-icon-edit table-operation" style="color: #2db7f5;"
+             v-hasPermission="['dict:update']"/>
+          <i @click="singleDelete(row)" class="el-icon-delete table-operation" style="color: #f50;"
+             v-hasPermission="['dict:delete']"/>
+          <i @click="handleView(row)" class="el-icon-view table-operation" style="color: #00DD77;"
+             />
+          <el-link class="no-perm" v-has-no-permission="['dict:update','dict:delete']">{{ $t('tips.noPermission') }}
+          </el-link>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination :limit.sync="queryParams.size" :page.sync="queryParams.current" :total="Number(tableData.total)"
+                @pagination="fetch" v-show="tableData.total>0"/>
+    <technology-file-edit :dialog-visible="dialog.isVisible" :type="dialog.type" @close="editClose" @success="editSuccess"
+                     ref="edit"/>
+
+    <el-dialog
+      :close-on-click-modal="false"
+      :close-on-press-escape="true"
+      title="预览"
+      width="80%"
+      top="50px"
+      :visible.sync="preview.isVisible"
+    >
+      <div style="width: 100%;height: 550px">
+          <el-input v-model="preview.context" :readOnly="true" type="textarea" :rows="23" style="width: 100%;"/>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import Pagination from '@/components/Pagination'
+import TechnologyFileEdit from './Edit'
+import tTechnologyFile from '@/api/prepareProductMgr/TTechnologyFile.js'
+import {initQueryParams} from '@/utils/commons'
+export default {
+  name: 'TechnologyFile',
+  components: {Pagination, TechnologyFileEdit},
+  filters: {
+    statusFilter(status) {
+      const map = {
+        false: 'danger',
+        true: 'success'
+      }
+      return map[status] || 'success'
+    }
+  },
+  data() {
+    return {
+      dialog: {
+        isVisible: false,
+        type: 'add'
+      },
+      tableKey: 0,
+      queryParams: initQueryParams({}),
+      selection: [],
+      loading: false,
+      tableData: {
+        total: 0
+      },
+      preview: {
+        isVisible: false,
+        context: ''
+      }
+    }
+  },
+  computed: {},
+  watch: {},
+  mounted() {
+    this.queryParams.model.mainFlag = '1'
+    this.fetch()
+  },
+  methods: {
+    editClose() {
+      this.dialog.isVisible = false
+      this.fetch();
+    },
+    editSuccess() {
+      this.search()
+    },
+    onSelectChange(selection) {
+      this.selection = selection
+    },
+    search() {
+      this.fetch({
+        ...this.queryParams
+      })
+      this.$emit('technologyFileClick', {id: -1})
+    },
+    reset() {
+      this.queryParams = initQueryParams({});
+      this.$refs.table.clearSort();
+      this.$refs.table.clearFilter();
+      this.queryParams.model.mainFlag = '1'
+      this.search()
+    },
+    singleDelete(row) {
+      this.$refs.table.clearSelection()
+      this.$refs.table.toggleRowSelection(row, true)
+      this.batchDelete()
+    },
+    batchDelete() {
+      if (!this.selection.length) {
+        this.$message({
+          message: this.$t('tips.noDataSelected'),
+          type: 'warning'
+        })
+        return
+      }
+      this.$confirm(this.$t('tips.confirmDelete'), this.$t('common.tips'), {
+        confirmButtonText: this.$t('common.confirm'),
+        cancelButtonText: this.$t('common.cancel'),
+        type: 'warning'
+      }).then(() => {
+        const ids = []
+        this.selection.forEach((u) => {
+          ids.push(u.id)
+        })
+        this.delete(ids)
+      }).catch(() => {
+        this.clearSelections()
+      })
+    },
+    clearSelections() {
+      this.$refs.table.clearSelection()
+    },
+    delete(ids) {
+      tTechnologyFile.delete({'ids': ids})
+        .then((response) => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.$message({
+              message: this.$t('tips.deleteSuccess'),
+              type: 'success'
+            })
+          }
+          this.search()
+        })
+    },
+    add() {
+      this.dialog.type = 'add'
+      this.dialog.isVisible = true
+      this.$refs.edit.setDictionary(false)
+    },
+    edit(row) {
+      this.$refs.edit.setDictionary(row)
+      this.dialog.type = 'edit'
+      this.dialog.isVisible = true
+    },
+    fetch(params = {}) {
+      this.loading = true
+
+      this.queryParams.current = params.current ? params.current : this.queryParams.current;
+      this.queryParams.size = params.size ? params.size : this.queryParams.size;
+
+      tTechnologyFile.page(this.queryParams).then(response => {
+        const res = response.data;
+        if (res.isSuccess) {
+          this.tableData = res.data;
+        }
+      }).finally(() => this.loading = false);
+    },
+    sortChange(val) {
+      this.queryParams.sort = val.prop;
+      this.queryParams.order = val.order;
+      if (this.queryParams.sort) {
+        this.search();
+      }
+    },
+    filterChange(filters) {
+      for (const key in filters) {
+        if (key.includes('.')) {
+          const val = {};
+          val[key.split('.')[1]] = filters[key][0];
+          this.queryParams.model[key.split('.')[0]] = val;
+        } else {
+          this.queryParams.model[key] = filters[key][0]
+        }
+      }
+      this.search()
+    },
+    rowClick(row) {
+      this.$emit('technologyFileClick', row)
+    },
+    handleView(row){
+      const data = {
+        id: row.id
+      }
+      tTechnologyFile.getProgramContent(data).then(response => {
+        this.preview.isVisible = true
+        const res = response.data;
+        if (res.isSuccess) {
+          this.preview.context = res.data.content;
+        }
+      }).finally(() => this.preview.isVisible = true);
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+</style>

+ 263 - 0
imcs-ui/src/views/zuihou/prepareProductMgr/technologyFile/TechnologyFileItem.vue

@@ -0,0 +1,263 @@
+<template>
+  <div class="app-container">
+    <div>
+      <div class="filter-container">
+        <el-input :placeholder="$t('table.dictionaryItem.name')" size="small" class="filter-item search-item"
+                  v-model="queryParams.model.name"/>
+        <el-button @click="search" class="filter-item" plain type="primary" size="small">{{ $t('table.search') }}</el-button>
+        <el-button @click="reset" class="filter-item" plain type="warning" size="small">{{ $t('table.reset') }}</el-button>
+        <el-dropdown class="filter-item" trigger="click"
+                     v-has-any-permission="['dict:add','dict:delete','dict:export']">
+          <el-button size="small">
+            {{ $t('table.more') }}
+            <i class="el-icon-arrow-down el-icon--right"/>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item @click.native="add" v-has-permission="['dict:add']">{{ $t('table.add') }}
+            </el-dropdown-item>
+            <el-dropdown-item @click.native="batchDelete" v-has-permission="['dict:delete']">{{ $t('table.delete') }}
+            </el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+      </div>
+      <el-table :data="tableData.records" :key="tableKey" @selection-change="onSelectChange" @sort-change="sortChange"  @cell-click="cellClick" @filter-change="filterChange"
+                border fit row-key="id" ref="table" size="mini" style="width: 100%;" v-loading="loading">
+        <el-table-column align="center" type="selection" width="40px" :reserve-selection="true"/>
+        <el-table-column :label="$t('table.technologyFile.name')" :show-overflow-tooltip="true" align="center" prop="type">
+          <template slot-scope="scope">
+            <span>{{ scope.row.name }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('table.technologyFile.fileSuffix')" :show-overflow-tooltip="true" align="center" prop="name">
+          <template slot-scope="scope">
+            <span>{{ scope.row.fileSuffix }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('table.technologyFile.size')" :show-overflow-tooltip="true" align="center"
+                         prop="describe">
+          <template slot-scope="scope">
+            <span>{{ scope.row.size +  scope.row.unit }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('table.technologyFile.updateTime')"  align="center" prop="createTime"  width="170px">
+          <template slot-scope="scope">
+            <span>{{ scope.row.updateTime }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('table.operation')"  column-key="operation" sortable="custom" align="center" class-name="small-padding fixed-width"
+                         width="100px">
+          <template slot-scope="{row}">
+            <i @click="edit(row)" class="el-icon-edit table-operation" style="color: #2db7f5;"
+               v-hasPermission="['dict:update']"/>
+            <i @click="singleDelete(row)" class="el-icon-delete table-operation" style="color: #f50;"
+               v-hasPermission="['dict:delete']"/>
+            <i @click="handleView(row)" class="el-icon-view table-operation" style="color: #00DD77;"
+            />
+            <el-link class="no-perm" v-has-no-permission="['dict:update','dict:delete']">{{ $t('tips.noPermission') }}
+            </el-link>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination :limit.sync="queryParams.size" :page.sync="queryParams.current" :total="Number(tableData.total)"
+                  @pagination="fetch" v-show="tableData.total>0"/>
+      <tTechnology-item-edit :dialog-visible="dialog.isVisible" :type="dialog.type" @close="editClose"
+                           @success="editSuccess" ref="edit"/>
+    </div>
+    <el-dialog
+      :close-on-click-modal="false"
+      :close-on-press-escape="true"
+      title="预览"
+      width="80%"
+      top="50px"
+      :visible.sync="preview.isVisible"
+    >
+      <div style="width: 100%;height: 550px">
+        <el-input v-model="preview.context" :readOnly="true" type="textarea" :rows="23" style="width: 100%;"/>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import Pagination from '@/components/Pagination'
+  import tTechnologyItemEdit from './TechnologyItemEdit.vue'
+  import tTechnologyFile from '@/api/prepareProductMgr/TTechnologyFile.js'
+  import elDragDialog from '@/directive/el-drag-dialog'
+  import {initQueryParams} from '@/utils/commons'
+  export default {
+    name: 'TechnologyFileItem',
+    directives: {elDragDialog},
+    components: {Pagination, tTechnologyItemEdit},
+    data() {
+      return {
+        // 附件上传
+        action: `${process.env.VUE_APP_BASE_API}/authority/tTechnologyFile/upload`,
+        tableKey: 0,
+        queryParams: initQueryParams({
+          model: {
+            parentId: -1
+          }
+        }),
+        selection: [],
+        loading: false,
+        technology: {
+          id: null,
+          code: ''
+        },
+        tableData: {
+          total: 0
+        },
+        dialog:{
+          isVisible: false,
+          type: ''
+        },
+        preview: {
+          isVisible: false,
+          context: ''
+        }
+      }
+    },
+    computed: {},
+    watch: {},
+    mounted() {
+     this.fetch({
+        ...this.queryParams
+      })
+    },
+    methods: {
+      search(){
+        this.fetch({
+          ...this.queryParams
+        })
+      },
+      reset(){
+        this.queryParams.model.name = ''
+        this.fetch({
+          ...this.queryParams
+        })
+      },
+      add(){
+        if(!this.queryParams.model.parentId || this.queryParams.model.parentId == -1){
+          this.$message.warning("请先选择一个主程序")
+          return;
+        }
+        this.dialog.type = 'add'
+        this.dialog.isVisible = true
+        this.$refs.edit.setDictionaryItem({
+          parentId: this.queryParams.model.parentId,
+          mainFlag: "2"
+        })
+      },
+      batchDelete(){
+        if (!this.selection.length) {
+          this.$message({
+            message: this.$t('tips.noDataSelected'),
+            type: 'warning'
+          })
+          return
+        }
+        this.$confirm(this.$t('tips.confirmDelete'), this.$t('common.tips'), {
+          confirmButtonText: this.$t('common.confirm'),
+          cancelButtonText: this.$t('common.cancel'),
+          type: 'warning'
+        }).then(() => {
+          const ids = []
+          this.selection.forEach((u) => {
+            ids.push(u.id)
+          })
+          this.delete(ids)
+        }).catch(() => {
+          this.clearSelections()
+        })
+      },
+      clearSelections() {
+        this.$refs.table.clearSelection()
+      },
+      delete(ids) {
+        tTechnologyFile.delete({'ids': ids})
+          .then((response) => {
+            const res = response.data
+            if (res.isSuccess) {
+              this.$message({
+                message: this.$t('tips.deleteSuccess'),
+                type: 'success'
+              })
+            }
+            this.search()
+          })
+      },
+      fetch(params = {}){
+        this.loading = true;
+        if (this.queryParams.timeRange) {
+          this.queryParams.map.createTime_st = this.queryParams.timeRange[0];
+          this.queryParams.map.createTime_ed = this.queryParams.timeRange[1];
+        }
+
+        this.queryParams.current = params.current ? params.current : this.queryParams.current;
+        this.queryParams.size = params.size ? params.size : this.queryParams.size;
+
+        tTechnologyFile.page(this.queryParams).then(response => {
+          const res = response.data;
+          if (res.isSuccess) {
+            this.tableData = res.data;
+          }
+        }).finally(() => this.loading = false);
+
+      },
+      technologyFileClick(technology) {
+        this.queryParams.model.parentId = technology.id
+        this.technology = technology
+        this.search()
+      },
+      onSelectChange(selection){
+        this.selection = selection
+      },
+      sortChange(){
+
+      },
+      cellClick(){
+
+      },
+      filterChange(){
+
+      },
+      edit(row){
+        this.$refs.edit.setDictionaryItem({
+          parentId: row.parentId,
+          mainFlag: "2",
+          id: row.id
+        })
+        this.dialog.type = 'edit'
+        this.dialog.isVisible = true
+      },
+      singleDelete(row){
+        this.$refs.table.clearSelection()
+        this.$refs.table.toggleRowSelection(row, true)
+        this.batchDelete()
+      },
+      editSuccess(){
+
+      },
+      editClose() {
+        this.dialog.isVisible = false
+        this.fetch({
+          ...this.queryParams
+        })
+      },
+      handleView(row){
+      const data = {
+        id: row.id
+      }
+      tTechnologyFile.getProgramContent(data).then(response => {
+        this.preview.isVisible = true
+        const res = response.data;
+        if (res.isSuccess) {
+          this.preview.context = res.data.content;
+        }
+      }).finally(() => this.preview.isVisible = true);
+    }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+</style>

+ 136 - 0
imcs-ui/src/views/zuihou/prepareProductMgr/technologyFile/TechnologyItemEdit.vue

@@ -0,0 +1,136 @@
+<template>
+  <el-dialog :close-on-click-modal="false" :close-on-press-escape="true" :title="title" :type="type" :visible.sync="isVisible" :width="width" top="50px">
+    <el-upload
+      class="upload-demo"
+      :headers="headers"
+      :action="action"
+      :data="fileOtherData"
+      multiple
+      :on-preview="handlePreview"
+      :on-remove="handleRemove"
+      :before-remove="beforeRemove"
+      :on-error='handleError'
+      :on-exceed="handleExceed"
+      :on-success="handleSuccess"
+      :file-list="fileList">
+      <el-button size="small" type="primary">点击上传</el-button>
+      <div slot="tip" class="el-upload__tip">只能上传EIA后缀文件,且不超过10MB</div>
+    </el-upload>
+  </el-dialog>
+</template>
+<script>
+import tTechnologyFile from '@/api/prepareProductMgr/TTechnologyFile.js'
+import db from "@/utils/localstorage";
+import {Base64} from "js-base64";
+export default {
+  name: 'TechnologyItemEdit',
+  components: {},
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false
+    },
+    type: {
+      type: String,
+      default: 'add'
+    }
+  },
+  data () {
+    return {
+      dictionaryItem: this.initDictionaryItem(),
+      screenWidth: 0,
+      width: this.initWidth(),
+      // 附件上传
+      action: `${process.env.VUE_APP_BASE_API}/authority/tTechnologyFile/upload`,
+      // 附件其它参数
+      fileOtherData: {
+        id: '',
+        parentId: "",
+        mainFlag: ''
+      },
+      fileList: [],
+    }
+  },
+  computed: {
+    headers() {
+      return {
+        token: 'Bearer ' + db.get("TOKEN", ""),
+        tenant: db.get("TENANT", "") || "",
+        Authorization: `Basic ${Base64.encode(`${process.env.VUE_APP_CLIENT_ID}:${process.env.VUE_APP_CLIENT_SECRET}`)}`
+      };
+    },
+    isVisible: {
+      get () {
+        return this.dialogVisible
+      },
+      set () {
+        this.close()
+      }
+    },
+    title () {
+      return this.type === 'add' ? this.$t('common.add') : this.$t('common.edit')
+    }
+  },
+  watch: {
+
+  },
+  mounted () {
+    window.onresize = () => {
+      return (() => {
+        this.width = this.initWidth()
+      })()
+    }
+  },
+  methods: {
+    initDictionaryItem () {
+      return {
+        id: '',
+        name: '',
+        parentId: null,
+        mainFlag: ''
+      }
+    },
+    initWidth () {
+      this.screenWidth = document.body.clientWidth
+      if (this.screenWidth < 991) {
+        return '90%'
+      } else if (this.screenWidth < 1400) {
+        return '45%'
+      } else {
+        return '800px'
+      }
+    },
+    setDictionaryItem (val) {
+      this.fileOtherData.id = val.id ? val.id : ''
+      this.fileOtherData.parentId = val.parentId
+      this.fileOtherData.mainFlag = val.mainFlag
+    },
+    close () {
+      this.fileList = [],
+      this.$emit('close')
+    },
+    // 文件上传失败时的钩子
+    handleError(err, file, fileList){
+      this.$message.error("文件上传失败~" + err)
+    },
+    handleRemove(file, fileList) {
+      console.log(file, fileList);
+    },
+    handlePreview(file) {
+      console.log(file);
+    },
+    beforeRemove(file, fileList) {
+      return this.$confirm(`确定移除 ${ file.name }?`);
+    },
+    handleExceed(){
+
+    },
+    handleSuccess(){
+      this.fileOtherData.id = ''
+      this.$emit('close')
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+</style>

+ 42 - 9
imcs-ui/src/views/zuihou/prepareProductMgr/technologyVersion/components/programForm/components/ProgramncMgr.vue

@@ -17,8 +17,14 @@
 				      	<el-option v-for="item in selectedEq" :key="item.resourceId" :label="item.name" :value="item.resourceId+','+item.name"></el-option>
 				    </el-select>
 		      	</el-form-item>
-		    	<!-- 上传程序 -->
-		      	<el-form-item :label='$t("resource.form.pgUpload")+":"' prop="filePath">
+          <el-form-item :label='$t("resource.form.mainPro")+":"' prop="filePath">
+            <el-select clearable  v-model="selectMainPro" :placeholder='$t("common.pleaseSelect")' value-key="id" style="width: 50%;" @change="handleSelectMain">
+              <el-option v-for="item in mainProgramList" :key="item.id" :label="item.name" :value="item" ></el-option>
+            </el-select>
+          </el-form-item>
+
+          <!-- 上传程序 -->
+<!--		      	<el-form-item :label='$t("resource.form.pgUpload")+":"' prop="filePath">
 		      		<el-input v-model="tenant.filePath" :readOnly="true" :placeholder='$t("common.pleaseEnter")'/>
 		          	<el-upload
 		          		accept=".*"
@@ -37,17 +43,17 @@
 					  	:on-exceed="handleExceed"
 					  	:file-list="fileList">
 					  <el-button size="small" type="primary">{{$t("common.upload")}}</el-button>
-					  <!--<div slot="tip" class="el-upload__tip">{{$t("resource.tips.fileTips")}}</div>-->
+					  &lt;!&ndash;<div slot="tip" class="el-upload__tip">{{$t("resource.tips.fileTips")}}</div>&ndash;&gt;
 					</el-upload>
-		      	</el-form-item>
+		      	</el-form-item>-->
 		      	<!-- 加工时间 -->
 			    <el-form-item :label='$t("resource.form.workTime")+":"' prop="workTime">
 			        <el-input-number v-model="tenant.workTime" :min="1" :max="1000" ></el-input-number>分钟
 				</el-form-item>
 		      	<!-- 程序内容 -->
-		      	<el-form-item :label='$t("resource.form.pgContent")+":"' prop="pgContent">
+<!--		      	<el-form-item :label='$t("resource.form.pgContent")+":"' prop="pgContent">
 		        	<el-input v-model="pgContent" :readOnly="true" type="textarea" :rows="6" style="width: 100%;"/>
-		      	</el-form-item>
+		      	</el-form-item>-->
 		      	<!-- 刀具管理 -->
 		      	<div>
 			      	<h2 class="editTitle">{{$t("prepare.common.toolMgr")}}
@@ -133,6 +139,7 @@ import attachmentMgrApi from "@/api/Attachment"
 import db from "@/utils/localstorage";
 import {Base64} from 'js-base64';
 import {initDicts, initQueryParams} from '@/utils/commons'
+import tTechnologyFile from '@/api/prepareProductMgr/TTechnologyFile.js'
 export default {
   name: 'ProgramncMgr',
   props: {
@@ -151,9 +158,11 @@ export default {
     	selectedEq: [], // 新增和修改的设备[设备]数据-来自·(可执行设备(位置))
     	subBtn: false,
     	formDisabled: false,
+      selectMainPro: '',
       dicts: {
         CUTTING_TOOL_CATEGORY: {}
       },
+      mainProgramList: [],
     	tableData: [],
     	eqList: [], // 设备下拉类别数据
     	toolList: [], // 刀具列表
@@ -198,10 +207,12 @@ export default {
   	// 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
 	created() {
     initDicts(['CUTTING_TOOL_CATEGORY'], this.dicts);
+    this.handleGetAllMainPro();
 		// 查询【程序】信息
 		if(!!this.programId){
 			this.getProgram(this.programId)
 		}
+
 	},
 	watch: {
 		programId(val){
@@ -241,7 +252,19 @@ export default {
 		    console.log("删除事件:", file, fileList);
 		    // 还原数据
 		    this.resetFile()
-		},
+		  },
+      //查询所有主程序
+      handleGetAllMainPro(){
+        const data = {
+          mainFlag: 1
+        }
+        tTechnologyFile.getAllByCondition(data).then(res=>{
+            res = res.data
+            if(res.isSuccess){
+              this.mainProgramList = res.data;
+            }
+        }).catch(() => {})
+      },
 
 		// 初始化,【刀具下拉】
 		getToolList(arrs){
@@ -295,7 +318,16 @@ export default {
 		console.log(fileList[0])
 	    return this.$confirm(`确定移除 ${ file.name }?`);
 	  },
-
+    handleSelectMain(item){
+      this.tenant.filePath = item.path ? item.path : ''
+      this.fileObj.filePath = item.path ? item.path : ''
+      this.fileObj.size = item.size ? item.path : ''
+      this.fileObj.programId = item.id ? item.path : ''
+      this.fileObj.submittedFileName = item ? item.name + "." + item.fileSuffix : ''
+      this.tenant.submittedFileName = item ? item.name + "." + item.fileSuffix : ''
+      this.fileObj.technologyFileId = item.id ? item.id : ''
+      this.tenant.technologyFileId = item.id ? item.id : ''
+    },
 	  // 文件上传成功时的钩子
 	  handleSuccess(response, file, fileList){
 	  	console.log("文件上传成功!", response)
@@ -336,7 +368,8 @@ export default {
         workTime: '',
         filePath: '',
         size: null,
-        runTime: null
+        runTime: null,
+        technologyFileId: ''
       }
     },
 

+ 44 - 44
imcs-ui/src/views/zuihou/resourceProductMgr/resourcesMgr/components/AutoCodeEdit.vue

@@ -1,22 +1,22 @@
 <template>
-  <el-dialog 
-  	:close-on-click-modal="false" 
-  	:close-on-press-escape="false" 
-  	:title="title" 
+  <el-dialog
+  	:close-on-click-modal="false"
+  	:close-on-press-escape="false"
+  	:title="title"
   	:append-to-body="true"
-  	:visible.sync="isVisible" 
-  	:width="width" 
+  	:visible.sync="isVisible"
+  	:width="width"
   	top="50px"
   >
-    <el-form ref="form" :model="tenant" :rules="rules" label-position="right" label-width="130px"> 
+    <el-form ref="form" :model="tenant" :rules="rules" label-position="right" label-width="130px">
         <el-form-item prop="type" v-if="this.type == 'add' ">
             <el-radio-group v-model="tenant.type" @change="switcher">
 				  <el-radio label="0" >动作节点</el-radio>
 				  <el-radio label="1" >自动化节点</el-radio>
-            </el-radio-group> 
-        </el-form-item>        
+            </el-radio-group>
+        </el-form-item>
       <el-form-item :label='$t("lineSide.form.name")' prop="name">
-          <el-input v-model="tenant.name" :placeholder='$t("common.pleaseEnter")'/>          
+          <el-input v-model="tenant.name" :placeholder='$t("common.pleaseEnter")'/>
       </el-form-item>
       <el-form-item label='父节点:'  v-show="isShow">
             <template>
@@ -52,7 +52,7 @@
                                  <template>
                                       <span>{{ this.rowData.productionResourceName }}</span>
                                  </template>
-                            </el-form-item>  
+                            </el-form-item>
                             <el-form-item label='指令:'>
                                 <template>
                                     <el-select v-model="tenant.command" :placeholder='$t("common.pleaseSelect")'>
@@ -64,8 +64,8 @@
                                         </el-option>
                                     </el-select>
                                 </template>
-                            </el-form-item> 
-                          </div>                             
+                            </el-form-item>
+                          </div>
                         </el-tab-pane>
                         <el-tab-pane label="AGV" name="2"  >
                           <div v-if=" tenant.category=='2' " >
@@ -73,7 +73,7 @@
                                  <template>
                                       <span>物料位置接驳位</span>
                                  </template>
-                            </el-form-item>                              
+                            </el-form-item>
                             <el-form-item label='终点:'>
                                 <template>
                                     <el-select v-model="tenant.targetId" :placeholder='$t("common.pleaseSelect")'>
@@ -85,11 +85,11 @@
                                         </el-option>
                                     </el-select>
                                 </template>
-                            </el-form-item> 
-                          </div>   
+                            </el-form-item>
+                          </div>
                         </el-tab-pane>
-                        <el-tab-pane label="机械手" name="3" > 
-                          <div v-if=" tenant.category=='3' " >                             
+                        <el-tab-pane label="机械手" name="3" >
+                          <div v-if=" tenant.category=='3' " >
                             <el-form-item label='机械手搬运设备:'>
                                 <template>
                                     <el-select v-model="tenant.resourceId" :placeholder='$t("common.pleaseSelect")'>
@@ -101,7 +101,7 @@
                                         </el-option>
                                     </el-select>
                                 </template>
-                            </el-form-item> 
+                            </el-form-item>
                             <el-form-item label='指令:'>
                                 <template>
                                     <el-select v-model="tenant.command" :placeholder='$t("common.pleaseSelect")' @change="actionChange">
@@ -113,15 +113,15 @@
                                         </el-option>
                                     </el-select>
                                 </template>
-                            </el-form-item> 
+                            </el-form-item>
                             <el-form-item label='取目标:' v-show="actionShow">
                                  <template>
                                       <span>物料位置</span>
                                  </template>
                             </el-form-item>
                             <el-form-item label='放目标:' v-show="!actionShow">
-                                 <template>                                                                            
-                                      <span v-if="!codeData.isFinal">本位置</span>                                     
+                                 <template>
+                                      <span v-if="!codeData.isFinal">本位置</span>
                                       <el-select v-if="codeData.isFinal"  v-model="tenant.targetId" :placeholder='$t("common.pleaseSelect")'>
                                         <el-option
                                                 v-for="item in actionTarget"
@@ -133,14 +133,14 @@
                                  </template>
                             </el-form-item>
                           </div>
-                        </el-tab-pane>    
+                        </el-tab-pane>
                         <el-tab-pane label="其他" name="4">
-                          <div v-if=" tenant.category=='4' " >                             
+                          <div v-if=" tenant.category=='4' " >
                             <el-form-item label='设备:'>
                                 <template>
                                       <span>其他设备</span>
-                                 </template>                                
-                            </el-form-item> 
+                                 </template>
+                            </el-form-item>
                             <el-form-item label='指令:'>
                                 <template>
                                     <el-select v-model="tenant.command" :placeholder='$t("common.pleaseSelect")'>
@@ -154,9 +154,9 @@
                                 </template>
                             </el-form-item>
                           </div>
-                        </el-tab-pane>                      
+                        </el-tab-pane>
                     </el-tabs>
-            </div>    
+            </div>
 
     </el-form>
     <div slot="footer" class="dialog-footer">
@@ -195,8 +195,8 @@ export default {
       confirmDisabled: false,
       parentIds: [],
       machineNodes:[{label:'上传程序',value:"1"},{label:'执行程序',value:"2"},{label:'坐标系校验',value:"3"}],
-      agvNodes:[{label:'舱体线接驳位',value:"1"},{label:'框体线接驳位',value:"2"},{label:'保障中心线接驳位',value:"3"}],
-      robotNodes:[{label:'舱体线机器人',value:"1"},{label:'伺服舵机',value:"2"},{label:'框体线机器人',value:"3"}],      
+      agvNodes:[{label:'FMS线接驳位',value:"1"}],
+      robotNodes:[{label:'FMS机器人',value:"1"}],
       robotAction:[{label:'取',value:"1"},{label:'放',value:"2"}],
       otherActon:[{label:'默认执行程序', value:"1"}],
       actionTarget: [{label:'本设备',value:"1"},{label:'接驳位',value:"2"}],
@@ -215,13 +215,13 @@ export default {
     if(this.isLine){
         this.robotNodes = [{label:'质量中心机器人',value:"1"},{label:'柔性线机器人',value:"2"},{label:'智能单元机器人',value:"3"}];
         this.agvNodes = [{label:'质量中心接驳位(2)',value:"1"},{label:'柔性线接驳位(2)',value:"2"},{label:'智能单元线接驳位(1)',value:"3"},{label:'上料接驳位(1)',value:"4"}];
-    }    
+    }
   },
   watch: {
 	  	// 如果rowData.id的值改变了
 	  	'codeData.id': {
 	  		handler(val, oldVal) {
-	        // 加载列表数据          
+	        // 加载列表数据
 	  			this.getPidCode()
 	      }
 	  	}
@@ -307,21 +307,21 @@ export default {
         }
       })
     },
-    switcher(value){       
-       this.isShow = (value == '0') ? false : true              
-       this.tenant.category = (value == '0') ? '' : '1' 
+    switcher(value){
+       this.isShow = (value == '0') ? false : true
+       this.tenant.category = (value == '0') ? '' : '1'
        this.getPidCode()
-       //this.tenant.resourceId = (value == '0') ? '0' : '' 
-      
-       //this.tenant.resourceId = (value == '0') ?  0 : this.rowData.id  
+       //this.tenant.resourceId = (value == '0') ? '0' : ''
+
+       //this.tenant.resourceId = (value == '0') ?  0 : this.rowData.id
     },
-    handleClick(name){     
+    handleClick(name){
       if(name != ''){
         this.tenant.category = name
       }
-    }, 
+    },
     getPidCode(){
-       if(this.codeData.id){           
+       if(this.codeData.id){
         resourceAutoCodeApi.getPid({businessId:this.codeData.id}).then(res => {
 				if(res.status == 200 && res.data.isSuccess){
 				   this.parentIds = res.data.data
@@ -329,14 +329,14 @@ export default {
           this.$message({
 						message: "获取动作节点数据失败",
 						type: "error"
-					})			
+					})
                 }
 		   })
        }
     },
     save () {
       //console.log(this.tenant)
-      this.tenant.businessId = this.codeData.id  
+      this.tenant.businessId = this.codeData.id
       resourceAutoCodeApi.save(this.tenant)
         .then((response) => {
           const res = response.data
@@ -357,7 +357,7 @@ export default {
         })
     },
     update () {
-      this.tenant.businessId = this.codeData.id 
+      this.tenant.businessId = this.codeData.id
       resourceAutoCodeApi.update(this.tenant)
         .then((response) => {
           const res = response.data

+ 55 - 54
imcs-ui/src/views/zuihou/resourceProductMgr/resourcesMgr/components/TenantCodeEdit.vue

@@ -11,7 +11,7 @@
       {{ this.codeData.name }}的节点配置
   </p>
   <div class="app-container">
-    
+
     <!-- 功能按钮 -->
     <el-row class="filter-container">
     	<el-col>
@@ -27,15 +27,15 @@
       :data="tableData.records"
       border
       fit
-      default-expand-all 
+      default-expand-all
       row-key="id"
       style="width: 100%;"
       @selection-change="onChange"
       @cell-click="doubleClick"
     >
       <el-table-column :label='$t("common.serialNo")' width="50px" align="center">
-	      
-      </el-table-column>	  
+
+      </el-table-column>
       <el-table-column prop="id" type="selection"></el-table-column>
       <!--<el-table-column width="50px" type="expand"></el-table-column>-->
       <el-table-column width="250px" prop="name" align="center" label="名称" ></el-table-column>
@@ -45,44 +45,44 @@
           	      {{ row.type == '0' ? "动作节点" : "自动化节点" }}
               </el-tag>
           </template>
-      </el-table-column>    
+      </el-table-column>
       <el-table-column prop="resourceId" label='设备' align="center" width="120px">
-           <template slot-scope="{ row }">             
-              <el-tag  v-if="row.category == '1'"> 
-                      本设备         	      
+           <template slot-scope="{ row }">
+              <el-tag  v-if="row.category == '1'">
+                      本设备
               </el-tag>
-              <el-tag  v-if="row.category == '2'"> 
-                      AGV        	      
+              <el-tag  v-if="row.category == '2'">
+                      AGV
               </el-tag>
               <el-tag  v-if="row.category == '3'">
-                    <span v-if="isLine"> 
+                    <span v-if="isLine">
                      {{ row.resourceId == 1 ? '质量中心机器人':(row.resourceId == 2 ? '柔性线机器人': '智能单元机器人' )  }}
                     </span>
                     <span v-else>
-                      {{ row.resourceId == 1 ? '舱体线机器人':(row.resourceId == 2 ? '伺服舵机': '框体线机器人' )  }} 
-                    </span>  
+                      {{ row.resourceId == 1 ? 'FMS机器人':(row.resourceId == 2 ? '伺服舵机': '框体线机器人' )  }}
+                    </span>
+              </el-tag>
+              <el-tag  v-if="row.category == '4'">
+                     其它设备
               </el-tag>
-              <el-tag  v-if="row.category == '4'"> 
-                     其它设备                                               	      
+          </template>
+      </el-table-column>
+      <el-table-column prop="command" label='指令' align="center" width="100px">
+           <template slot-scope="{ row }">
+              <el-tag  v-if=" row.category =='1' ">
+                    {{ row.command == "1" ? '上传程序':(row.command == "2" ? '执行程序': '坐标系校验' )  }}
               </el-tag>
-          </template>        
-      </el-table-column> 
-      <el-table-column prop="command" label='指令' align="center" width="100px">           
-           <template slot-scope="{ row }">              
-              <el-tag  v-if=" row.category =='1' "> 
-                    {{ row.command == "1" ? '上传程序':(row.command == "2" ? '执行程序': '坐标系校验' )  }}        	      
+              <el-tag  v-if=" row.category =='2' ">
+                     搬运
               </el-tag>
-              <el-tag  v-if=" row.category =='2' "> 
-                     搬运  
+              <el-tag  v-if=" row.category =='3' ">
+                     {{ row.command == "1" ? '取':'放' }}
               </el-tag>
-              <el-tag  v-if=" row.category =='3' "> 
-                     {{ row.command == "1" ? '取':'放' }}   
+              <el-tag  v-if=" row.category =='4' ">
+                     默认操作
               </el-tag>
-              <el-tag  v-if=" row.category =='4' "> 
-                     默认操作   
-              </el-tag>              
           </template>
-      </el-table-column> 
+      </el-table-column>
       <el-table-column prop="weight" label='权重' align="center" width="80px"></el-table-column>
       <el-table-column prop="status" :label='$t("common.status.init")' align="center" width="80px">
       	<template slot-scope="{ row }">
@@ -94,10 +94,10 @@
       <el-table-column
         :label="$t('table.operation')"
         fixed="right"
-        align="center" 
-        column-key="operation"       
+        align="center"
+        column-key="operation"
       >
-        <template slot-scope="{ row }">		          	
+        <template slot-scope="{ row }">
           <el-tooltip class="item" :content='$t("common.edit")' effect="dark" placement="top-start">
 	          <i
 	            class="el-icon-edit table-operation"
@@ -120,21 +120,21 @@
       ref="editCode"
       :codeData = codeData
       :dialog-visible="msgBox.isVisible"
-      :title="msgBox.title" 
+      :title="msgBox.title"
       @close="editCodeClose"
       @success="editCodeSuccess"
     />
   </div>
   </el-dialog>
 </template>
-  
+
 <script>
 import AutoCodeEdit from "../components/AutoCodeEdit"
 import {initDicts, initQueryParams } from '@/utils/commons'
 
 import resourceAutoCodeApi from "@/api/resourceProductMgr/resourceAutoCode"
 export default {
-  name: 'TenantCodeEdit',  
+  name: 'TenantCodeEdit',
   components: { AutoCodeEdit },
   props: {
     dialogVisible: {
@@ -154,17 +154,17 @@ export default {
       rowData: {},
       tenant: this.initTenant(),
       width: "100%",
-      screenWidth: 0, 
+      screenWidth: 0,
       queryParams: initQueryParams({}),
       //machineNodes:[{label:'上传程序',value:1},{label:'执行程序',value:2},{label:'刀具校验',value:3}],
       robotNodes:{},
       dicts:{
         NATION: {}
-      }, 
+      },
       msgBox: {
 	        isVisible: false,
 	        title: ""
-	    },         
+	    },
       loading: false,
       tableKey: 0,
       selection: [],
@@ -177,7 +177,7 @@ export default {
 	  	// 如果rowData.id的值改变了
 	  	'codeData.id': {
 	  		handler(val, oldVal) {
-	        // 加载列表数据          
+	        // 加载列表数据
 	  			this.load()
 	      }
 	  	}
@@ -187,8 +187,9 @@ export default {
     if(!this.isLine){
       this.robotNodes = {'1':'质量中心机器人','2':'柔性线机器人','3':'智能单元机器人'}
     }else{
-      this.robotNodes = {'1':'舱体线机器人','2':'伺服舵机','3':'框体线机器人'}
-    }    
+      //this.robotNodes = {'1':'舱体线机器人','2':'伺服舵机','3':'框体线机器人'}
+      this.robotNodes = {'1':'舱体线机器人'}
+    }
   },
   computed: {
     isVisible: {
@@ -212,14 +213,14 @@ export default {
         name: '',
         type:'1',
         status: '1',
-        remark: '',   
+        remark: '',
       }
     },
     setTenant (val, rowData) {
-    	if(val){        
+    	if(val){
     		this.tenant = { ...val }
     	}
-      this.rowData = rowData  
+      this.rowData = rowData
     },
     editCodeClose(){
        this.msgBox.isVisible = false
@@ -235,9 +236,9 @@ export default {
 	      this.msgBox.isVisible = true
 	  },
     editCode(row){
-        this.$refs.editCode.type = "edit" 
-        console.log(row)         
-	      this.$refs.editCode.setTenant(row, this.codeData)        
+        this.$refs.editCode.type = "edit"
+        console.log(row)
+	      this.$refs.editCode.setTenant(row, this.codeData)
         this.$refs.editCode.switcher(row.type)
         this.$refs.editCode.handleClick(row.category)
 	      this.msgBox.title = "修改节点"
@@ -258,13 +259,13 @@ export default {
 	          type: "warning"
 	        })
 	        return
-	      }	
+	      }
 	      this.$confirm('确认是否删除节点数据?', this.$t("common.tips"), {
 	      	distinguishCancelAndClose: true,
 	        confirmButtonText: this.$t("common.confirm"),
 	        cancelButtonText: this.$t("common.cancel"),
 	        type: "warning"
-	      }).then(() => {	      	
+	      }).then(() => {
 		      this.delete(id)
 	      }).catch(() => {})
 	    },
@@ -288,14 +289,14 @@ export default {
     load () {
        //this.tableData.records = [{name:"从上到序取放到CS2000",type:0,resource:"",command:"",weight:100,id:1, children:[{name:"从物料位置取",type:1,resource:"柔性线机械手",command:"抓",weight:110,id:2},{name:"放到清洗机",type:1,resource:"柔性线机械手",command:"放",weight:90,id:3}]},{name:"执行清洗",type:0,resource:"",command:"",weight:80,id:4,children:[{name:"执行清洗",type:1,resource:"清洗机",command:"执行清洗",weight:70,id:5}]}]
         if(this.codeData.id){
-           this.loading = true        
-			     resourceAutoCodeApi.getList({businessId:this.codeData.id}).then(response => { 
+           this.loading = true
+			     resourceAutoCodeApi.getList({businessId:this.codeData.id}).then(response => {
 				   const res = response.data
 	    		 if(res.isSuccess){
-	    			  this.tableData.records = res.data	    			
+	    			  this.tableData.records = res.data
 	    		  }
 			     }).finally(() => this.loading = false)
-        }    
+        }
     },
     doubleClick (row, column) {
 	      if (column['columnKey'] === "operation") {
@@ -308,7 +309,7 @@ export default {
 	          this.$refs.table.toggleRowSelection(row)
 	        }
 	      })
-	
+
 	      if (!flag) {
 	        this.$refs.table.toggleRowSelection(row, true)
 	      }

+ 74 - 2
package-lock.json

@@ -1,6 +1,78 @@
 {
-  "name": "imcs-yj-fe",
+  "name": "331_imcs_web",
   "lockfileVersion": 2,
   "requires": true,
-  "packages": {}
+  "packages": {
+    "": {
+      "dependencies": {
+        "echarts-liquidfill": "^3.1.0"
+      }
+    },
+    "node_modules/echarts": {
+      "version": "5.5.0",
+      "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.5.0.tgz",
+      "integrity": "sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==",
+      "peer": true,
+      "dependencies": {
+        "tslib": "2.3.0",
+        "zrender": "5.5.0"
+      }
+    },
+    "node_modules/echarts-liquidfill": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmmirror.com/echarts-liquidfill/-/echarts-liquidfill-3.1.0.tgz",
+      "integrity": "sha512-5Dlqs/jTsdTUAsd+K5LPLLTgrbbNORUSBQyk8PSy1Mg2zgHDWm83FmvA4s0ooNepCJojFYRITTQ4GU1UUSKYLw==",
+      "peerDependencies": {
+        "echarts": "^5.0.1"
+      }
+    },
+    "node_modules/tslib": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
+      "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==",
+      "peer": true
+    },
+    "node_modules/zrender": {
+      "version": "5.5.0",
+      "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.5.0.tgz",
+      "integrity": "sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==",
+      "peer": true,
+      "dependencies": {
+        "tslib": "2.3.0"
+      }
+    }
+  },
+  "dependencies": {
+    "echarts": {
+      "version": "5.5.0",
+      "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.5.0.tgz",
+      "integrity": "sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==",
+      "peer": true,
+      "requires": {
+        "tslib": "2.3.0",
+        "zrender": "5.5.0"
+      }
+    },
+    "echarts-liquidfill": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmmirror.com/echarts-liquidfill/-/echarts-liquidfill-3.1.0.tgz",
+      "integrity": "sha512-5Dlqs/jTsdTUAsd+K5LPLLTgrbbNORUSBQyk8PSy1Mg2zgHDWm83FmvA4s0ooNepCJojFYRITTQ4GU1UUSKYLw==",
+      "requires": {}
+    },
+    "tslib": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
+      "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==",
+      "peer": true
+    },
+    "zrender": {
+      "version": "5.5.0",
+      "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.5.0.tgz",
+      "integrity": "sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==",
+      "peer": true,
+      "requires": {
+        "tslib": "2.3.0"
+      }
+    }
+  }
 }