shj
2022-08-01 00d4082a1709e7c32e7fdefc815266a58d87bf8e
对接
已修改4个文件
70 ■■■■■ 文件已修改
src/views/facilityManagement/EquipmentStatistics/index.vue 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/facilityManagement/InstrumentationInformation/index.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/facilityManagement/ProductionEquipment/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/facilityManagement/safetyEquipment/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/facilityManagement/EquipmentStatistics/index.vue
@@ -7,10 +7,36 @@
<script lang="ts">
import { defineComponent, onMounted, ref } from 'vue';
import * as echarts from 'echarts';
import { ElMessage } from 'element-plus';
import { facilityManagementApi } from '/@/api/facilityManagement';
export default defineComponent({
    setup() {
        const listApi = () => {
            facilityManagementApi()
                .getequipmentInfoStatistics()
                .then((res) => {
                    if (res.data.code == 200) {
                        let arr=[]
                        arr=res.data.data
                        let date=[]
                        for (let i = 0; i < arr.length; i++) {
                            date.push(arr[i].count)
                        }
                        init(date);
                    } else {
                        ElMessage({
                            showClose: true,
                            message: res.data.msg,
                            type: 'error',
                        });
                    }
                });
        };
        onMounted(() => {
            listApi();
        });
        const main = ref();
        const init = () => {
        const init = (data:any) => {
            var myChart = echarts.init(main.value);
            var option = {
                tooltip: {},
@@ -35,7 +61,7 @@
                color: ['#6394f9'],
                series: [
                    {
                        data: [120, 200, 150, 80, 70, 110, 130],
                        data: data,
                        type: 'bar',
                    },
                ],
@@ -43,13 +69,11 @@
            myChart.setOption(option);
        };
        onMounted(() => {
            init();
        });
        return {
            init,
            onMounted,
            main,
            listApi,
        };
    },
});
src/views/facilityManagement/InstrumentationInformation/index.vue
@@ -19,7 +19,6 @@
            <el-col :span="4">
            <el-input v-model="filterText" style="height: 30px" placeholder="请输入关键字" />
                <div class="tree">
                    <!-- <el-tree ref="treeRef" class="filter-tree" :data="data" :props="props" :filter-node-method="filterNode" /> -->
                    <el-tree ref="treeRef" :data="data" :props="props" @node-click="handleNodeClick" :filter-node-method="filterNode" />
                </div>
@@ -38,7 +37,7 @@
                    </div>
                </div>
                <div style="padding-left: 10px">
                    <el-table ref="multipleTableRef" :data="tableData" style="width: 100%">
                    <el-table ref="multipleTableRef" :data="tableData" style="width: 100%"  @selection-change="handleSelectionChange">
                        <el-table-column type="selection" align="center" width="55" />
                        <el-table-column type="expand">
                            <template #default="scope">
@@ -142,6 +141,7 @@
        // 重置
        const resetForm = () => {
            ruleForm.searchParams.qName = '';
            ruleForm.searchParams.positionNum = '';
            listApi();
        };
        const listApi = () => {
@@ -226,13 +226,13 @@
            }
            deletAll.value = arr.toString();
            if (val.length == 1) {
                // warning.value = false;
                warning.value = false;
                danger.value = false;
            } else if (val.length == 0) {
                // warning.value = true;
                warning.value = true;
                danger.value = true;
            } else {
                // warning.value = true;
                warning.value = true;
                danger.value = false;
            }
        };
@@ -286,7 +286,7 @@
            label: 'typeName',
            children: 'childList',
            value: 'id',
        }
        };
        watch(filterText, (val) => {
            treeRef.value!.filter(val);
        });
@@ -296,10 +296,10 @@
            return data.typeName.includes(value);
        };
       const handleNodeClick=(data: Tree)=>{
            ruleForm.searchParams.positionNum=data.id
            ruleForm.searchParams.positionNum = data.id;
            listApi();
       }
        const data=ref([])
        };
        const data = ref([]);
        onMounted(() => {
            listApiTree();
        });
src/views/facilityManagement/ProductionEquipment/index.vue
@@ -38,7 +38,7 @@
                    </div>
                </div>
                <div style="padding-left: 10px">
                    <el-table ref="multipleTableRef" :data="tableData" style="width: 100%">
                    <el-table ref="multipleTableRef" :data="tableData"  @selection-change="handleSelectionChange" style="width: 100%">
                        <el-table-column type="selection" align="center" width="55" />
                        <el-table-column type="expand">
                            <template #default="scope">
@@ -142,6 +142,7 @@
        // 重置
        const resetForm = () => {
            ruleForm.searchParams.qName = '';
            ruleForm.searchParams.positionNum = '';
            listApi();
        };
        const listApi = () => {
@@ -226,13 +227,13 @@
            }
            deletAll.value = arr.toString();
            if (val.length == 1) {
                // warning.value = false;
                warning.value = false;
                danger.value = false;
            } else if (val.length == 0) {
                // warning.value = true;
                warning.value = true;
                danger.value = true;
            } else {
                // warning.value = true;
                warning.value = true;
                danger.value = false;
            }
        };
src/views/facilityManagement/safetyEquipment/index.vue
@@ -38,7 +38,7 @@
                    </div>
                </div>
                <div style="padding-left: 10px">
                    <el-table ref="multipleTableRef" :data="tableData" style="width: 100%">
                    <el-table ref="multipleTableRef" :data="tableData"  @selection-change="handleSelectionChange" style="width: 100%">
                        <el-table-column type="selection" align="center" width="55" />
                        <el-table-column type="expand">
                            <template #default="scope">
@@ -142,6 +142,7 @@
        // 重置
        const resetForm = () => {
            ruleForm.searchParams.qName = '';
            ruleForm.searchParams.positionNum = '';
            listApi();
        };
        const listApi = () => {
@@ -226,13 +227,13 @@
            }
            deletAll.value = arr.toString();
            if (val.length == 1) {
                // warning.value = false;
                warning.value = false;
                danger.value = false;
            } else if (val.length == 0) {
                // warning.value = true;
                warning.value = true;
                danger.value = true;
            } else {
                // warning.value = true;
                warning.value = true;
                danger.value = false;
            }
        };