Fixiaobai
2023-08-18 a42bb6f81ac140f191d4fb3980d5564bb0eb063b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<template>
    <div>
        <el-col :span="10">
            <p style="font-size: 13px;padding-left: 40px;">计划信息</p>
        </el-col>
        <el-col>
            <el-form :model="planAddInfo" style="padding-left: 150px;">
                <el-form-item>
                    <el-col :span="6" style="display: flex;justify-content: space-around;">
                        <span>负责人:</span>
                        <el-select v-model="planAddInfo.measurePerson" placeholder="请选择活动区域">
                            <el-option label="区域一" value="shanghai"></el-option>
                            <el-option label="区域二" value="beijing"></el-option>
                        </el-select>
                    </el-col>
                    <el-col :span="8" style="display: flex;justify-content: space-around;">
                        <span>计划时间:</span>
                        <el-date-picker v-model="planAddInfo.planDate" type="daterange" range-separator="至" start-placeholder="开始日期"
                            end-placeholder="结束日期">
                        </el-date-picker>
                    </el-col>
                    <el-col :span="5"></el-col>
                    <el-col :span="5" style="display: flex;justify-content: space-around;">
                        <span>计量单位:</span>
                        <el-input style="width: 150px;" v-model="planAddInfo.unit" placeholder=""></el-input>
                    </el-col>
                </el-form-item>
            </el-form>
        </el-col>
        <el-col>
            <el-col style="font-size: 13px;padding-left: 55px;">
                计量信息
            </el-col>
            <el-col>
                <el-progress style="width: 95%;padding-left: 40px;margin-top: 20px;" :percentage="6" :stroke-width="2"
                    :show-text="false"></el-progress>
            </el-col>
        </el-col>
        <el-col style="width:93%;height: 20vh;margin-top: 30px; margin-left: 40px;">
            <el-table ref="codePointsTable" :cell-style="{ textAlign: 'center' }"
                :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'center' }"
                :data="codePointsTable" style="width: 100%">
                <el-table-column type="index" label="序号" min-width="90" />
                <el-table-column prop="equipmentPointName" label="仪器设备名称" min-width="150">
                    <template slot-scope="scope">
                        <span v-show="!codePointesTableStatus">{{ scope.row.equipmentPoint }}</span>
                        <el-input v-show="codePointesTableStatus" v-model="scope.row.equipmentPoint" />
                    </template>
                </el-table-column>
 
                <el-table-column prop="measuringRange" label="测量范围" min-width="150">
                    <template slot-scope="scope">
                        <span v-show="!codePointesTableStatus">{{ scope.row.measuringRange }}</span>
                        <el-input v-show="codePointesTableStatus" v-model="scope.row.measuringRange" />
                    </template>
                </el-table-column>
                <el-table-column prop="unit" label="单位" min-width="150">
                    <template slot-scope="scope">
                        <span v-show="!codePointesTableStatus">{{ scope.row.unit }}</span>
                        <el-input v-show="codePointesTableStatus" v-model="scope.row.unit" />
                    </template>
                </el-table-column>
                <el-table-column prop="descriptiveness" label="描述" min-width="200">
                    <template slot-scope="scope">
                        <span v-show="!codePointesTableStatus">{{ scope.row.descriptiveness }}</span>
                        <el-input v-show="codePointesTableStatus" v-model="scope.row.descriptiveness" />
                    </template>
                </el-table-column>
                <el-table-column prop="descriptiveness" label="操作" min-width="200">
                    <template slot-scope="scope">
                        <el-tag type="" icon=""></el-tag>
                    </template>
                </el-table-column>
            </el-table>
        </el-col>
    </div>
</template>
<script>
export default {
    data() {
        return {
            planAddInfo: {
                plannedOrderNumber: 7897897987,
                measurePerson: '某某人',
                planDate: "2021-09-08 ~ 2024-08-09",
                unit: '某某检测局',
                createPerson: '某某负责人',
                createTime: '2021-09-08'
            },
            codePointsTable: [{
                id: '',
                equipmentPointName: '',
                measuringRange: '',
                termValidity: "",
                planDate: null,
            }],
            // 码点表格的状态:数据展示false/新增输入true
            codePointesTableStatus: true,
        }
    },
    methods: {
        // 新增设备码点
        addNewCodePoints() {
            //
            if (!this.codePointsTable) {
                this.codePointsTable = []
            }
            const newObj = {}
            newObj.equipmentPointName = ''
            newObj.descriptiveness = ''
            newObj.unit = ''
            newObj.instrumentId = this.equipmentDetail.id
            this.codePointsTable.push(newObj)
        }
    }
}
</script>