licp
2024-07-29 7257363fabc7b4f11fb5dfa1a553b1bc6f89bd02
检验任务-k检验值输入不进去
已修改4个文件
已添加3个文件
171 ■■■■■ 文件已修改
src/components/do/a6-device/check-and-accept.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/a6-device/files.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/a6-device/operation-overview.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/a6-device.vue 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/js/worker.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/a6-device/check-and-accept.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
<!--
 * @Author: licp lichunping@guanfang.com.cn
 * @Date: 2024-07-29 15:44:19
 * @LastEditors: licp lichunping@guanfang.com.cn
 * @LastEditTime: 2024-07-29 16:11:59
 * @FilePath: \center-lims-before\src\components\do\a6-device\check-and-accept.vue
 * @Description: è¿™æ˜¯é»˜è®¤è®¾ç½®,请设置`customMade`, æ‰“å¼€koroFileHeader查看配置 è¿›è¡Œè®¾ç½®: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
src/components/do/a6-device/files.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
<!--
 * @Author: licp lichunping@guanfang.com.cn
 * @Date: 2024-07-29 15:43:42
 * @LastEditors: licp lichunping@guanfang.com.cn
 * @LastEditTime: 2024-07-29 15:43:48
 * @FilePath: \center-lims-before\src\components\do\a6-device\files.vue
 * @Description: è¿™æ˜¯é»˜è®¤è®¾ç½®,请设置`customMade`, æ‰“å¼€koroFileHeader查看配置 è¿›è¡Œè®¾ç½®: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
src/components/do/a6-device/operation-overview.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
<template>
  <div>运行总览</div>
</template>
<script>
export default {
}
</script>
<style scoped>
</style>
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -2186,8 +2186,7 @@
          conclusionList = a.template.filter(n => n.v.ps != undefined && n.v.ps.value === '结论')
          finalList = a.template.filter(n => n.v.ps != undefined && n.v.ps.value === '最终值')
          a.template.forEach( b => {
            if (b.v.ps != undefined && b.v.ps.value === '序号' && (b.v.mc == undefined || Object.keys(b.v.mc)
                .length === 4)) {
            if (b.v.ps != undefined && b.v.ps.value === '序号' && (b.v.mc == undefined || Object.keys(b.v.mc).length === 4)) {
              count1++
              b.v.v = count1
            }
@@ -2195,12 +2194,14 @@
              b.v.v = this.getAsk(b.i)
            }
            if (b.v.ps != undefined && typeof b.v.ps.value ==='string'&&b.v.ps.value.includes('检验值')) {
              b.v.v = ''
              this.$set(b.v, 'v','' )
              // b.v.v = ''
              b.u = ''
              b.i && this.param[b.i].insValue.push(b)
            }
            if (b.v.ps != undefined && b.v.ps.value === '计算值') {
              b.v.v = ''
              this.$set(b.v, 'v','' )
              // b.v.v = ''
              b.i && this.param[b.i].comValue.push(b)
            }
            if (b.v.ps != undefined && b.v.ps.value === '设备编码') {
@@ -2570,11 +2571,16 @@
        return sum
      },
      handleInput (n) {
        n.v.v = n.v.v.replace(/[^\d.^e\-/+]/g, '');
        n.v.v = n.v.v.replace(/\.{2,}/g,"."); //只保留第一个. æ¸…除多余的
        n.v.v = n.v.v.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
        n.v.v = n.v.v.replace(/\/{2,}/g,"/"); //只保留第一个/清除多余的
        n.v.v = n.v.v.replace("/","$#$").replace(/\//g,"").replace("$#$","/");
        try {
          n.v.v = n.v.v.replace(/[^\d.^e\-/+]/g, '');
          n.v.v = n.v.v.replace(/\.{2,}/g,"."); //只保留第一个. æ¸…除多余的
          n.v.v = n.v.v.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
          n.v.v = n.v.v.replace(/\/{2,}/g,"/"); //只保留第一个/清除多余的
          n.v.v = n.v.v.replace("/","$#$").replace(/\//g,"").replace("$#$","/");
        } catch (error) {
          console.log(error);
        }
      },
      getInspectionItemType(id) {
        for (var a in this.currentSample.insProduct) {
src/components/view/a6-device.vue
@@ -2,17 +2,87 @@
  <div class="device-page">
    <div class="device-left">
      <el-input placeholder="输入设备名称" suffix-icon="el-icon-search" v-model="search" size="small"
      style="margin-bottom: 5px;" clearable></el-input>
      @keyup.enter="handleSearch"
      style="margin-bottom: 5px;" clearable @change="handleSearch"></el-input>
      <ul v-loading="loading">
        <li v-for="(item,index) in 28" :title="item" :class="{active:index==current}" @click="getCurrentDevice(item,index)">设备列表设备列表设备列表设备列表</li>
      </ul>
    </div>
    <div class="device-right"></div>
    <div class="device-right">
      <el-radio-group v-model="currentPage" size="small">
        <el-radio-button :label="item.id" v-for="(item,index) in tabList" :key="index"
          size="small">{{ item.title }}</el-radio-button>
      </el-radio-group>
      <div class="device-right-content">
        <component :is="currentPage"></component>
      </div>
    </div>
  </div>
</template>
<script>
import operationOverview from '../do/a6-device/operation-overview.vue';
export default {
  components:{
    operationOverview,
  },
  data(){
    return {
      search:''
      search:'',
      current:0,
      loading:false,
      tabList:[
        {
          id:'operationOverview',
          title:'设备运行总览',
        },
        {
          id:1,
          title:'设备档案',
        },
        {
          id:2,
          title:'设备验收',
        },
        {
          id:3,
          title:'设备校准',
        },
        {
          id:4,
          title:'设备核查',
        },
        {
          id:5,
          title:'设备维护',
        },
        {
          id:6,
          title:'设备借用',
        },
        {
          id:7,
          title:'设备故障',
        },
        {
          id:8,
          title:'使用记录',
        },
        {
          id:9,
          title:'设备停用/启用',
        },
      ],
      currentPage:'operationOverview'
    }
  },
  methods:{
    handleSearch(m){
      // this.loading = true;
    },
    getCurrentDevice(item,index){
      this.current = index;
      this.currentPage = 'operationOverview';
    }
  }
}
@@ -31,10 +101,42 @@
  background: #fff;
  margin-right: 10px;
  border-radius: 16px;
  box-sizing: border-box;
  padding: 10px 16px;
}
.device-left ul{
  list-style-type: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
  color: #999999;
  cursor: pointer;
  margin-top: 10px;
  height: calc(100% - 46px);
  overflow-y: scroll;
}
.device-left ul li{
  white-space: nowrap;         /* ç¦æ­¢æ¢è¡Œ */
  overflow: hidden;            /* éšè—æº¢å‡ºçš„æ–‡æœ¬ */
  text-overflow: ellipsis;     /* ç”¨çœç•¥å·è¡¨ç¤ºæº¢å‡ºçš„æ–‡æœ¬ */
  padding: 3px 0;
}
.device-left ul li:hover{
  color: #3A7BFA;
}
.device-left ul li.active{
  color: #3A7BFA;
}
.device-right{
  background: #fff;
  flex: 1;
  border-radius: 16px;
  box-sizing: border-box;
  padding: 10px 16px;
}
.device-right-content{
  margin-top: 10px;
  height: calc(100% - 42px);
}
</style>
src/main.js
@@ -15,12 +15,12 @@
Vue.prototype.$Big = Big;
// é¡¹ç›®åˆ‡æ¢
Vue.prototype.PROJECT = '检测中心'
// Vue.prototype.PROJECT = '装备电缆'
// Vue.prototype.PROJECT = '检测中心'
Vue.prototype.PROJECT = '装备电缆'
//本地
// Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
// const javaApi = 'http://127.0.0.1:8001';
const javaApi = 'http://192.168.92.249:8001';
// const javaApi = 'http://192.168.92.249:8001';
//云
// Vue.prototype.LOCATIONVUE = "http://114.132.189.42:8080";
@@ -32,7 +32,7 @@
//装备电缆测试库
// Vue.prototype.LOCATIONVUE = "http://10.16.173.59";
// const javaApi = 'http://10.16.173.59:8001';
const javaApi = 'http://10.16.173.59:8001';
// const javaApi = 'http://192.168.92.249:8001';
Vue.prototype.HaveJson = (val) => {
static/js/worker.js
@@ -857,7 +857,7 @@
    } else if (isPoint) {
      return str.replace('ABS', '').replace(/\(|\)/g, '')
    }else {
      // console.log('str', str,eval(str))
      // console.log('str', str)
      return eval(str)
    }
  } catch (error) {