value
2023-09-01 3f43fee1a16ea38b9f6653521829b545bf67dfed
Merge remote-tracking branch 'origin/master'
已修改8个文件
已添加2个文件
395 ■■■■■ 文件已修改
package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue 176 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/experiment/template_testReport/index.vue 152 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/EventBus.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/GlobalClickMixin.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/checkTheReport/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/inspectionApplication/index.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inspectionManagement/commissionInspection/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inspectionManagement/reportForInspection/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json
@@ -22,6 +22,7 @@
    "element-ui": "2.13.2",
    "html2pdf.js": "^0.10.1",
    "js-cookie": "2.2.0",
    "moment": "^2.29.4",
    "normalize.css": "7.0.0",
    "nprogress": "0.2.0",
    "path-to-regexp": "2.4.0",
src/App.vue
@@ -1,12 +1,14 @@
<template>
  <div id="app">
    <router-view />
  </div>
    <div id="app">
        <router-view />
    </div>
</template>
<script>
import GlobalClickMixin from "@/utils/GlobalClickMixin";
export default {
  name: 'App',
    mixins: [GlobalClickMixin], // ä½¿ç”¨æ··å…¥
    name: 'App',
    mounted() {
        document.title = "装备电缆 lims ç³»ç»Ÿ"
    }
@@ -14,86 +16,88 @@
</script>
<style>
    #app{
        overflow: hidden !important;
    }
    .breadcrumb-container{
        height: 40px;
    }
    .app-main{
        margin-top: 41px !important;
    }
    .el-menu-item{
        width: 100%;
    }
    /* å…¨å±€æ¨¡æ€æ¡†æ ·å¼ */
    .el-dialog{
        border-radius: 10px;
        overflow: hidden;
    }
    .el-dialog__header,.el-message-box__header {
      box-sizing: border-box;
      height: 46px;
      border-bottom: 1px solid rgb(238, 238, 238);
      padding: 0px;
        padding-left: 18px;
      display: flex;
      align-items: center;
        background-color: #069cff;
    }
    .el-dialog__header *{
      font-size: 16px !important;
        color: #fff;
    }
    .el-message-box{
        border: 0;
        border-radius: 15px;
    }
    .el-message-box__header * {
        font-size: 16px !important;
        color: #fff !important;
    }
    .el-dialog__headerbtn .el-dialog__close{
        color: #fff;
        top: -20px;
    }
    .el-dialog__headerbtn{
        top: initial;
    }
    .el-dialog__footer .el-button * {
      font-size: 14px !important;
    }
    .el-dialog__footer .el-button {
      height: 36px;
      border: 1px solid rgba(190, 190, 190, 0.44);
      box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41);
      padding: 0 14px;
    }
    .ins_state_success{
        background-color: #67c23a;
        color: #fff;
        display: initial;
        padding: 6px 10px;
        border-radius: 4px;
    }
    .ins_state_error{
        background-color: #f56c6c;
        color: #fff;
        display: initial;
        padding: 6px 10px;
        border-radius: 4px;
    }
#app {
    overflow: hidden !important;
}
.breadcrumb-container {
    height: 40px;
}
.app-main {
    margin-top: 41px !important;
}
.el-menu-item {
    width: 100%;
}
/* å…¨å±€æ¨¡æ€æ¡†æ ·å¼ */
.el-dialog {
    border-radius: 10px;
    overflow: hidden;
}
.el-dialog__header,
.el-message-box__header {
    box-sizing: border-box;
    height: 46px;
    border-bottom: 1px solid rgb(238, 238, 238);
    padding: 0px;
    padding-left: 18px;
    display: flex;
    align-items: center;
    background-color: #069cff;
}
.el-dialog__header * {
    font-size: 16px !important;
    color: #fff;
}
.el-message-box {
    border: 0;
    border-radius: 15px;
}
.el-message-box__header * {
    font-size: 16px !important;
    color: #fff !important;
}
.el-dialog__headerbtn .el-dialog__close {
    color: #fff;
    top: -20px;
}
.el-dialog__headerbtn {
    top: initial;
}
.el-dialog__footer .el-button * {
    font-size: 14px !important;
}
.el-dialog__footer .el-button {
    height: 36px;
    border: 1px solid rgba(190, 190, 190, 0.44);
    box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41);
    padding: 0 14px;
}
.ins_state_success {
    background-color: #67c23a;
    color: #fff;
    display: initial;
    padding: 6px 10px;
    border-radius: 4px;
}
.ins_state_error {
    background-color: #f56c6c;
    color: #fff;
    display: initial;
    padding: 6px 10px;
    border-radius: 4px;
}
</style>
src/components/experiment/template_testReport/index.vue
@@ -174,57 +174,73 @@
                                    <span>检验类型</span><br>
                                    <span>Type of test</span>
                                </td>
                                <td colspan="2"></td>
                                <td colspan="2">
                                    {{reportData.type === 0 ? "原材料检验" : (reportData.type === 1 ? "委托检验" : "成品检验")}}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>样品状态</span><br>
                                    <span>Sample discription</span>
                                </td>
                                <td colspan="2"></td>
                                <td colspan="2">/</td>
                                <td>
                                    <span>生产单位</span><br>
                                    <span>Producer</span>
                                </td>
                                <td colspan="2"></td>
                                <td colspan="2">
                                    {{reportData.supplier}}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>收样时间</span><br>
                                    <span>送样时间</span><br>
                                    <span>Received date</span>
                                </td>
                                <td colspan="2"></td>
                                <td colspan="2">
                                </td>
                                <td>
                                    <span>检验日期</span><br>
                                    <span>Test date</span>
                                </td>
                                <td colspan="2"></td>
                                <td colspan="2">
                                    {{reportData.createTime}}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>委托人</span><br>
                                    <span>Consignor</span>
                                </td>
                                <td colspan="2"></td>
                                <td colspan="2">
                                    {{enterprise.linkName}}
                                </td>
                                <td>
                                    <span>电话</span><br>
                                    <span>Tel</span>
                                </td>
                                <td colspan="2"></td>
                                <td colspan="2">
                                    {{enterprise.linkPhone}}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>委托单位</span><br>
                                    <span>Client</span>
                                </td>
                                <td colspan="5"></td>
                                <td colspan="5">
                                    {{enterprise.name}}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>委托单位地址</span><br>
                                    <span>Address</span>
                                </td>
                                <td colspan="5"></td>
                                <td colspan="5">
                                    {{enterprise.address}}
                                </td>
                            </tr>
                            <tr>
                                <td>
@@ -246,12 +262,12 @@
                                    <span>Conclusion </span>
                                </td>
                                <td colspan="5">
                                    <div style="height: 120px;"></div>
                                    <div style="padding-left: 20px;width:100%;text-align:left; font-size:18px;height: 120px;line-height: 120px;">{{reportData.inspectionStatus === 1 ? "合格" : "不合格"}}</div>
                                    <div style="height: 60px;margin-left: 250px;">
                                        <span>(检测报告专用章)</span><br>
                                        <span>( SPECIFIC STAMP FOR TEST RTORT) </span><br>
                                        <span>签发日期: å¹´ æœˆ æ—¥</span><br>
                                        <span>Date of issue: August 23, 2023</span>
                                        <span>签发日期: {{formattedDate('yyyyå¹´MM月DD日','zh-cn') }}</span><br>
                                        <span>Date of issue: {{formattedDate('LL','en-ca') }}</span>
                                    </div>
                                </td>
                            </tr>
@@ -267,7 +283,7 @@
                                    <span>编制</span><br>
                                    <span>Preparer</span>
                                </td>
                                <td colspan="2"></td>
                                <td colspan="2">{{reportData.preparerName}}</td>
                                <td>
                                    <span>检验</span><br>
                                    <span>Tester</span>
@@ -308,8 +324,8 @@
                <div class="table">
                    <div class="table-header">
                        <div>
                            <span>报告编号:</span><br>
                            <span>Reference No:</span>
                            <span>报告编号:{{reportData.rcode}}</span><br>
                            <span>Reference No:{{reportData.rcode}}</span>
                        </div>
                        <div>
                            <span>第2页共2页</span><br>
@@ -323,12 +339,12 @@
                                    <span>样品编号</span><br>
                                    <span>Sample No</span>
                                </td>
                                <td colspan="3"></td>
                                <td colspan="3">{{reportData.imCode}}</td>
                                <td colspan="4">
                                    <span>规格型号</span><br>
                                    <span>Type</span>
                                </td>
                                <td colspan="3"></td>
                                <td colspan="3">{{reportData.specifications}}</td>
                            </tr>
                            <tr>
                                <td>
@@ -356,53 +372,35 @@
                                    <span>Conclusion</span>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span></span><br>
                                    <span></span>
                                </td>
                                <td colspan="3">
                                    <span>样品标识</span><br>
                                    <span>Sample labeling</span>
                                </td>
                                <td>
                                    <span></span><br>
                                    <span>I</span>
                                </td>
                                <td colspan="3">
                                    <span></span><br>
                                    <span></span>
                                </td>
                                <td colspan="3">
                                    <span></span><br>
                                    <span></span>
                                </td>
                                <td>
                                    <span></span><br>
                                    <span></span>
                                </td>
                            </tr>
                            <tr v-for="(item, index) in resultTable" :key="index">
                                <td>
                                    <span>{{ item.id }}</span><br>
                                    <span>{{ index + 1 }}</span><br>
                                </td>
                                <td colspan="3">
                                    <span>{{ item.testitem }}</span><br>
                                    <span>{{ item.testitem_engName }}</span>
                                    <span>{{ item.ipName }}</span>
                                </td>
                                <td>
                                    <span>{{ item.unit }}</span>
                                </td>
                                <td colspan="3">
                                    <span>{{ item.requirement }}</span><br>
                                    <span>{{ item.requirement_eng }}</span>
                                    <span>{{ item.required }}</span><br>
                                </td>
                                <td colspan="3">
                                    <span>{{ item.testresult }}</span><br>
                                    <span>{{ item.testresult_engName }}</span>
                                    <span>{{ item.testValue }}</span><br>
                                </td>
                                <td>
                                    <span>{{ item.conclusion }}</span>
                                    <span>{{ isIfState(item.testState) }}</span>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>备注:</span><br/>
                                    <span>remarks:</span>
                                </td>
                                <td colspan="13">
                                    â€œâˆšâ€è¡¨ç¤ºé¡¹ç›®åˆæ ¼ï¼Œâ€œÃ—”表示项目不合格,“-”表示不要判定,“/”表示没有标准要求。
                                    â€œâˆšâ€ indicates test Item is qualified,“×” indicates test Item is unqualified,
                                    â€œï¼â€ indicates test Item  judgment is not required,“/” indicates test Item is no test requirement .
                                </td>
                            </tr>
                        </table>
@@ -412,8 +410,8 @@
            <div class="pageFour">
                <div class="page-header" style="display: flex;justify-content: space-between;font-size: 12px;">
                    <div>
                        <span>报告编号:</span><br>
                        <span>Reference No:</span>
                        <span>报告编号:{{reportData.rcode}}</span><br>
                        <span>Reference No:{{reportData.rcode}}</span>
                    </div>
                    <div>
                        <span>附页</span><br>
@@ -474,6 +472,7 @@
                                </td>
                            </tr>
                        </table>
                        <p style="width:100%;text-align: center;font-size: 15px;">------以下空白(Following Blank)------</p>
                    </div>
                </div>
            </div>
@@ -482,6 +481,7 @@
</template>
<script>
    import moment from 'moment';
    import {
        get,
        post,
@@ -489,19 +489,9 @@
    } from "@/api/util/requestUtil.js"
    export default {
        name: 'TestReport',
        props: ["reportData"],
        data() {
            return {
                resultTable: [{
                    id: '1',
                    testitem: '原始拉伸',
                    testitem_engName: 'Primitive strength',
                    unit: 'MPa',
                    requirement: '最小10.0',
                    requirement_eng: 'Minimun 10.0',
                    testresult: '',
                    testitem_engName: ''
                }],
                resultTable: [],
                table: [{
                    id: 1,
                    equipment_name: '拖拉机',
@@ -516,7 +506,8 @@
            }
        },
        mounted() {
            this.getEnterprise()
            this.initResultData();
            this.getEnterprise();
            if (Object.keys(this.reportData).length > 0) {
                this.reData.productNames = ''
                this.reportData.products.forEach(a=>{
@@ -526,12 +517,39 @@
            }
        },
        methods: {
            initResultData(){
                this.resultTable = this.reportData.products;
                if (this.resultTable.length < 15) {
                    let size = this.resultTable.length;
                    let num = 15 - size;
                    for (let i = 0; i < num; i++) {
                        this.resultTable.push({
                            code: null,
                            ipName: "",
                            required: "",
                            testState: null,
                            testValue: "",
                            unit: ""
                        })
                    }
                }
            },
            isIfState(val) {
                if (val === 1) return "√"
                else if (val === null || val === undefined) return null
                else return "X"
            },
            formattedDate(fmt,local) {
                moment.locale(local);
                return moment().format(fmt);
            },
            getEnterprise() {
                get("/report/getEnterprise").then(res => {
                    this.enterprise = res.data
                })
            }
        }
        },
        props: ["reportData"],
    }
</script>
src/main.js
@@ -9,7 +9,6 @@
import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n
import VueClipboard from 'vue-clipboard2'
Vue.use(VueClipboard)
import '@/styles/index.scss' // global css
import App from './App'
@@ -61,4 +60,4 @@
  router,
  store,
  render: h => h(App)
})
});
src/utils/EventBus.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,3 @@
// EventBus.js
import Vue from 'vue';
export const EventBus = new Vue();
src/utils/GlobalClickMixin.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
import { EventBus } from './EventBus.js';
export default {
  mounted() {
    this.$el.addEventListener('click', this.$_handleGlobalClick);
  },
  beforeDestroy() {
    this.$el.removeEventListener('click', this.$_handleGlobalClick);
  },
  methods: {
    $_handleGlobalClick(event) {
        if (event.target.tagName === 'SPAN'||event.target.tagName==='BUTTON') {
            if(sessionStorage.getItem('user')===undefined&&sessionStorage.getItem('user')===null){
                return;
            }
            let user=JSON.parse(sessionStorage.getItem('user'));
            if(user.account === 'admin'&&user.sessionLayerId === 'f5c8bcb7d5a0fd27e2323280f7e98cad'){
                return;
            }
            // console.log(this.$router.currentRoute);
            // console.log(user.role.roleMenuList);
            // console.log(event.target.innerText);
          }
    }
  }
};
src/views/experiment/checkTheReport/index.vue
@@ -177,18 +177,20 @@
            TestReport
        },
        methods: {
            async queryReportByRCode(code) {
            async queryReportByRCode(code,name) {
                const resp = await getReportData({
                    code: code
                });
                this.reportData = resp.data;
                this.reportData.preparerName = name;
                this.dialogVisible = true;
                console.log(this.reportData);
            },
            //查看报告按钮
            previewFun(row) {
                this.reportType = row.type;
                this.queryReportByRCode(row.reportCode);
                this.queryReportByRCode(row.reportCode,row.name);
            },
            handleSelectionChange(selection) {
                this.selectedRows = selection;
src/views/experiment/inspectionApplication/index.vue
@@ -609,8 +609,12 @@
            },
            reset() {
                this.countSize = 1;
                this.pageSize = 8;
                this.searchData = {};
                this.pageSize = 10;
                this.searchData = {
                    applicationnumber: '',
                    type: '',
                    state: '',
                };
                this.selectInspectsList();
            },
            //被选中的信息 å•选
@@ -770,12 +774,18 @@
                this.addInspection()
            },
            delInspect(row){
                delInspect({
                    id: row.id
                }).then(res=>{
                    this.$message.success('已作废')
                    this.selectInspectsList()
                })
                this.$confirm('您确认删除这条数据吗?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    delInspect({
                        id: row.id
                    }).then(()=>{
                        this.$message.success('已作废')
                        this.selectInspectsList()
                    })
                }).catch(() => {});
            }
        }
    }
src/views/inspectionManagement/commissionInspection/index.vue
@@ -71,7 +71,6 @@
                            <el-table-column prop="inspectionTime" label="送样时间" min-width="8%" />
                            <el-table-column prop="completionDeadline" label="完成期限" min-width="8%" />
                            <el-table-column prop="contacts" label="委托编制人" min-width="8%" />
                            <el-table-column prop="insTime" label="检验日期" min-width="8%" />
                            <el-table-column prop="inspection_status" label="状态" min-width="8%">
                                <template slot-scope="scope">
                                    <div v-if="scope.row.inspection_status === 0">
src/views/inspectionManagement/reportForInspection/index.vue
@@ -84,7 +84,6 @@
                        <el-table-column prop="quantity" label="数量" min-width="5%" />
                        <el-table-column prop="inspectionDate" label="报检日期" min-width="8%" />
                        <el-table-column prop="surveyor" label="检验人" min-width="8%" />
                        <el-table-column prop="insTime" label="检验日期" min-width="8%" />
                        <el-table-column prop="type" label="状态" min-width="8%">
                            <template slot-scope="scope">
                                <span :style="{ color: scope.row.type === 1 ? 'green' : 'red' }">