1 |
- {"remainingRequest":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/src/views/account/terminalManagement/index.vue?vue&type=style&index=0&id=683f525e&lang=scss&scoped=true","dependencies":[{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/src/views/account/terminalManagement/index.vue","mtime":1708395041886},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/css-loader/dist/cjs.js","mtime":1708395146948},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/vue-loader/lib/loaders/stylePostLoader.js","mtime":1708395147772},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/postcss-loader/src/index.js","mtime":1708395147225},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/sass-loader/dist/cjs.js","mtime":1708395146389},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/cache-loader/dist/cjs.js","mtime":1708395146433},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/vue-loader/lib/index.js","mtime":1708395147382}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCi5kYXNoYm9hcmQgewogICAgJi1jb250YWluZXIgewogICAgICAgIG1hcmdpbjogMzBweDsKICAgIH0KCiAgICAmLXRleHQgewogICAgICAgIGZvbnQtc2l6ZTogMzBweDsKICAgICAgICBsaW5lLWhlaWdodDogNDZweDsKICAgIH0KfQoKLmRhc2hib2FyZC1jb250YWluZXIgewogICAgLnNlYXJjaC1jb250ZW50IHsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICBoZWlnaHQ6IDc0cHg7CiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgcGFkZGluZy1sZWZ0OiAxMHB4OwoKICAgICAgICAuZWwtaW5wdXQgewogICAgICAgICAgICBtYXJnaW46IDAgMTBweDsKICAgICAgICB9CgogICAgICAgIC5lbC1zZWxlY3QgewogICAgICAgICAgICBtYXJnaW46IDAgMTBweDsKICAgICAgICB9CgogICAgICAgIC5zZWFyY2gtYnRuIHsKICAgICAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgaGVpZ2h0OiAxMDAlOwogICAgICAgICAgICBtYXJnaW4tbGVmdDogMTBweDsKCiAgICAgICAgICAgIGRpdiB7CiAgICAgICAgICAgICAgICAvLyBtYXJnaW46IDAgNnB4OwogICAgICAgICAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrOwogICAgICAgICAgICAgICAgd2lkdGg6IDgwcHg7CiAgICAgICAgICAgICAgICBoZWlnaHQ6IDQwcHg7CiAgICAgICAgICAgICAgICBib3JkZXItcmFkaXVzOiAycHg7CiAgICAgICAgICAgICAgICBmb250LXNpemU6IDE0cHg7CiAgICAgICAgICAgICAgICBsaW5lLWhlaWdodDogNDBweDsKICAgICAgICAgICAgICAgIHRleHQtYWxpZ246IGNlbnRlcjsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgZGl2OmhvdmVyIHsKICAgICAgICAgICAgICAgIGN1cnNvcjogcG9pbnRlcjsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgLnNlYXJjaCB7CiAgICAgICAgICAgICAgICBtYXJnaW4tcmlnaHQ6IDEwcHg7CiAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjMjc2NkREOwogICAgICAgICAgICAgICAgY29sb3I6ICNGN0Y4RkI7CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIC5zZWFyY2g6aG92ZXIgewogICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogIzREODVGNDsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgLnJlc2V0IHsKICAgICAgICAgICAgICAgIGNvbG9yOiAjMzMzMzM0OwogICAgICAgICAgICAgICAgYm9yZGVyOiAxcHggc29saWQgI0Q3RDdENzsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgLnJlc2V0OmhvdmVyIHsKICAgICAgICAgICAgICAgIGNvbG9yOiAjMUY5RkZGOwogICAgICAgICAgICAgICAgYm9yZGVyOiAxcHggc29saWQgIzFGOUZGRjsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KCiAgICAudGFibGUtY29udGVudCB7CiAgICAgICAgbWFyZ2luLXRvcDogMTVweDsKICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmOwogICAgICAgIHBhZGRpbmc6IDAgMjBweCAyMHB4OwoKICAgICAgICAuYnRuIHsKICAgICAgICAgICAgbWFyZ2luOiAxNXB4IDIwcHggMTVweCAwOwogICAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7CiAgICAgICAgICAgIGZsb2F0OiBsZWZ0OwogICAgICAgICAgICB0ZXh0LWFsaWduOiBjZW50ZXI7CiAgICAgICAgICAgIHdpZHRoOiA5OHB4OwogICAgICAgICAgICBoZWlnaHQ6IDM0cHg7CiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDJweDsKICAgICAgICAgICAgYm9yZGVyOiAxcHggc29saWQgI0FCQzdGRDsKICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDM0cHg7CiAgICAgICAgICAgIGZvbnQtd2VpZ2h0OiA0MDA7CiAgICAgICAgICAgIGZvbnQtc2l6ZTogMTRweDsKICAgICAgICAgICAgY29sb3I6ICMyMjUwQzg7CiAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNFN0VFRkY7CiAgICAgICAgfQoKICAgICAgICAuYnRuOmhvdmVyIHsKICAgICAgICAgICAgY29sb3I6ICNGRkZGRkY7CiAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICMyMjUwQzg7CiAgICAgICAgICAgIGJvcmRlcjogMXB4IHNvbGlkICMyMjUwQzg7CiAgICAgICAgfQoKICAgICAgICAuYnRuOmFjdGl2ZSB7CiAgICAgICAgICAgIGNvbG9yOiAjRkZGRkZGOwogICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjMTk0REE0OwogICAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZCAjMTk0REE0OwogICAgICAgIH0KCgogICAgICAgIC5zdGFydFVzaW5nIHsKICAgICAgICAgICAgd2lkdGg6IDYwcHg7CiAgICAgICAgICAgIGhlaWdodDogMjVweDsKICAgICAgICAgICAgbWFyZ2luOiAxNC41cHggYXV0byAwOwogICAgICAgICAgICBsaW5lLWhlaWdodDogMjVweDsKICAgICAgICAgICAgdGV4dC1hbGlnbjogY2VudGVyOwogICAgICAgICAgICBmb250LXNpemU6IDEycHg7CiAgICAgICAgICAgIGNvbG9yOiAjZmZmOwogICAgICAgICAgICBib3JkZXItcmFkaXVzOiA1cHg7CiAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICMwMDk3NEI7CiAgICAgICAgfQoKICAgICAgICAuRGVhY3RpdmF0ZSB7CiAgICAgICAgICAgIHdpZHRoOiA2MHB4OwogICAgICAgICAgICBoZWlnaHQ6IDI1cHg7CiAgICAgICAgICAgIG1hcmdpbjogMTQuNXB4IGF1dG8gMDsKICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDI1cHg7CiAgICAgICAgICAgIHRleHQtYWxpZ246IGNlbnRlcjsKICAgICAgICAgICAgZm9udC1zaXplOiAxMnB4OwogICAgICAgICAgICBjb2xvcjogI2ZmZjsKICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNXB4OwogICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjRkY5OTMzOwogICAgICAgIH0KCiAgICAgICAgLm9wZXJhdGVCdG4gewogICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjsKICAgICAgICAgICAgY29sb3I6ICMyODY2REQ7CgogICAgICAgICAgICBkaXYgewogICAgICAgICAgICAgICAgZm9udC1zaXplOiAxNHB4OwogICAgICAgICAgICAgICAgbWFyZ2luOiAwIDVweDsKICAgICAgICAgICAgICAgIGN1cnNvcjogcG9pbnRlcjsKICAgICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLnBhZ2luYXRpb24gewogICAgICAgICAgICBtYXJnaW46IDEwcHggMDsKICAgICAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgICAgICAgIGhlaWdodDogMjBweDsKCiAgICAgICAgICAgIC5lbC1wYWdpbmF0aW9uIHsKICAgICAgICAgICAgICAgIGZsb2F0OiByaWdodDsKICAgICAgICAgICAgICAgIG1hcmdpbjogMTBweCAwOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQp9CgoKLm9wZXJhdGVCdG4gewogICAgZGlzcGxheTogZmxleDsKICAgIGp1c3RpZnktY29udGVudDogY2VudGVyOwogICAgY29sb3I6ICMyODY2REQ7CgogICAgZGl2IHsKICAgICAgICBmb250LXNpemU6IDE2cHg7CiAgICAgICAgbWFyZ2luOiAwIDVweDsKICAgICAgICBjdXJzb3I6IHBvaW50ZXI7CiAgICB9Cn0KCi5lbC10b29sdGlwX19wb3BwZXIgewogICAgbWF4LXdpZHRoOiAzMCU7CiAgICBwYWRkaW5nLWJvdHRvbTogNXB4ICFpbXBvcnRhbnQ7CiAgICBkaXNwbGF5OiAtd2Via2l0LWJveDsKICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICB0ZXh0LW92ZXJmbG93OiBlbGxpcHNpczsKICAgIC13ZWJraXQtbGluZS1jbGFtcDogMTU7CiAgICAtd2Via2l0LWJveC1vcmllbnQ6IHZlcnRpY2FsOwoKfQoKLmVsLXRvb2x0aXBfX3BvcHBlciwKLmVsLXRvb2x0aXBfX3BvcHBlci5pcy1kYXJrIHsKICAgIGJhY2tncm91bmQ6IHJnYig0OCwgNjUsIDg2KSAhaW1wb3J0YW50OwogICAgY29sb3I6ICNmZmYgIWltcG9ydGFudDsKICAgIGxpbmUtaGVpZ2h0OiAyNHB4Owp9CgouaHhqIHsKICAgIGhlaWdodDogNDZweDsKICAgIGxpbmUtaGVpZ2h0OiA0NnB4OwogICAgdGV4dC1hbGlnbjogY2VudGVyOwp9CgoueHptYmEgewogICAgY29sb3I6ICMyNzY2ZGQ7CiAgICB0ZXh0LWRlY29yYXRpb246IHVuZGVybGluZTsKICAgIGN1cnNvcjogcG9pbnRlcjsKfQo="},{"version":3,"sources":["index.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+ZA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA","file":"index.vue","sourceRoot":"src/views/account/terminalManagement","sourcesContent":["<template>\n <div class=\"dashboard-container\">\n <div class=\"search-content\">\n <el-input placeholder=\"请输入终端编码\" v-model=\"queryParams.terminalCode\" style=\"width: 220px\" clearable />\n <el-input placeholder=\"请输入终端名称\" v-model=\"queryParams.terminalName\" style=\"width: 220px\" clearable />\n <el-select v-model=\"queryParams.status\" placeholder=\"请选择终端状态\" style=\"width: 220px\" clearable>\n <el-option v-for=\"item in statusType\" :key=\"item.value\" :label=\"item.label\" :value=\"item.value\" clerable />\n </el-select>\n <div class=\"search-btn\">\n <div class=\"search\" @click=\"handleQuery\">查询</div>\n <div class=\"reset\" @click=\"reset\">重置</div>\n </div>\n </div>\n <div class=\"table-content\">\n <div style=\"width: 100%;height: 30px;\">\n <!-- <div style=\"font-size: 18px;height: 30px;float: left;position: relative;top: 17px;\">\n 当前相机个数:<span style=\"font-size: 24px; color: red\">{{\n total\n }}</span>\n </div> -->\n <div class=\"btn\" @click=\"addTerminalBtn\">\n <span class=\"icon font_family\"></span>\n 新增\n </div>\n <div class=\"btn\" @click=\"batchDelTerminal\">\n <span class=\"icon font_family\"></span>\n 批量删除\n </div>\n <div class=\"btn\" @click=\"importLoadIn\">\n <span class=\"icon font_family\"></span>\n 导入\n </div>\n <div class=\"btn\" @click=\"exportBaseVehicleTerminal\">\n <span class=\"icon font_family\"></span>\n 导出\n </div>\n <div class=\"btn\" @click=\"downloaExcel\">\n <span class=\"icon font_family\"></span>\n 下载模板\n </div>\n <el-dialog center :visible.sync=\"uploadDialog\" title=\"终端信息导入\" width=\"620px\">\n <el-upload style=\"text-align: center\" ref=\"uploadFile\" class=\"upload-demo\" drag action=\"#\"\n :http-request=\"uploadHttpRequest\" :auto-upload=\"false\" :file-list=\"fileList\"\n :on-change=\"uploadFileList\">\n <i class=\"el-icon-upload\" />\n <div class=\"el-upload__text\">将文件拖到此处,或<em>点击上传</em></div>\n <!-- <div class=\"el-upload__tip\">只能上传xls/xlsx文件,且不超过500kb</div> -->\n </el-upload>\n <div class=\"hxj\">支持扩展名:.xlsx</div>\n <div class=\"hxj\">请先下载模板,根据模板内容填写,再上传文件 <span class=\"xzmba\" @click=\"downloaExcel\">下载模板</span>\n </div>\n <div slot=\"footer\" class=\"dialog-footer\">\n <div class=\"search\" @click=\"httpRequest\">保 存</div>\n <div class=\"reset\" @click=\"uploadDialog = false\">取 消</div>\n </div>\n\n </el-dialog>\n <addTerminalDialog v-if=\"addTerminalData.dialogVisible\" :addTerminalData=\"addTerminalData\"\n @addTerminal=\"addTerminal\"></addTerminalDialog>\n <updateTerminalDialog @updateTerminalBtn=\"updateTerminalBtn\" :updataTerminalData=\"updataTerminalData\">\n </updateTerminalDialog>\n </div>\n <el-table :data=\"tableData\" style=\"width: 100%\" @selection-change=\"handleSelectionChange\">\n <el-table-column type=\"selection\" width=\"55\" />\n <el-table-column prop=\"terminalCode\" label=\"终端编码\" width=\"150px\" align=\"center\" />\n <el-table-column prop=\"terminalName\" label=\"终端名称\" align=\"center\" width=\"200\" />\n <el-table-column prop=\"vehicleCode\" label=\"关联机车号\" align=\"center\" />\n <!-- <el-table-column prop=\"status\" label=\"终端状态\" align=\"center\" width=\"150\">\n <template slot-scope=\"scope\">\n <span v-if=\"scope.row.status == '1'\">在线</span>\n <span v-else style=\"color: red;\">离线</span>\n </template>\n </el-table-column> -->\n <el-table-column prop=\"remark\" label=\"备注\" align=\"center\" width=\"180\"></el-table-column>\n <el-table-column prop=\"createTime\" label=\"创建时间\" width=\"170\" align=\"center\" />\n <el-table-column prop=\"updateTime\" label=\"更新时间\" width=\"170\" align=\"center\"></el-table-column>\n <el-table-column label=\"操作\" align=\"center\">\n <template slot-scope=\"scope\">\n <div class=\"operateBtn\" style=\"display:flex\">\n <div type=\"text\" @click=\"updateTerminal(scope.row)\">修改</div>\n <div type=\"text\" @click=\"delTerminal(scope.row)\">删除</div>\n </div>\n </template>\n </el-table-column>\n </el-table>\n <div class=\"pagination\">\n <el-pagination :page-sizes=\"[10, 15, 20]\" layout=\"total, sizes, prev, pager, next, jumper\" :total=\"total\"\n @size-change=\"handleSizeChange\" @current-change=\"handleCurrentChange\" />\n </div>\n </div>\n </div>\n</template>\n \n<script>\nimport { getToken } from '@/utils/auth'\nimport { mapGetters } from 'vuex'\nimport {\n vehicleTerminalList,\n exportBaseVehicleTerminal,\n downloaExcel,\n importBaseVehicleTerminal,\n vehicleTerminaleDelete,\n vehicleTerminalAdd,\n vehicleTerminalUpdate\n} from '@/api/account/terminalManagement'\nimport addTerminalDialog from './components/addTerminalDialog.vue'\nimport updateTerminalDialog from './components/updateTerminalDialog.vue'\nexport default {\n name: 'Cart',\n computed: {\n ...mapGetters(['name'])\n },\n components: {\n addTerminalDialog,\n updateTerminalDialog\n },\n data() {\n return {\n addTerminalData: {\n dialogVisible: false\n },\n updataTerminalData: {\n dialogVisible: false,\n data: {}\n },\n uploadDialog: false,\n fileList: [],\n queryParams: {\n pageNum: 1,\n pageSize: 10,\n terminalCode: '',\n terminalName: '',\n status: '',\n },\n tableData: [],\n statusType: [\n {\n label: '在线',\n value: '1'\n },\n {\n label: '离线',\n value: '2'\n }\n ],\n delTerminalList: '',\n exportData: {\n ids: []\n }\n }\n },\n watch: {\n\n },\n created() {\n this.vehicleTerminalList(this.queryParams)\n },\n methods: {\n handleSizeChange(val){\n this.queryParams.pageSize = val\n this.vehicleTerminalList(this.queryParams)\n },\n handleCurrentChange(val){\n this.queryParams.pageNum = val\n this.vehicleTerminalList(this.queryParams)\n },\n addTerminal(payload) {\n vehicleTerminalAdd(payload).then(res => {\n if (res.code == 200) {\n this.$message({\n type: 'success',\n message: '新增成功!'\n });\n this.vehicleTerminalList(this.queryParams)\n this.addTerminalData.dialogVisible = false\n } else {\n this.$message({\n type: 'error',\n message: res.msg\n });\n }\n })\n },\n addTerminalBtn() {\n this.addTerminalData.dialogVisible = true\n },\n updateTerminal(row) {\n this.updataTerminalData.data = {\n id: row.id,\n terminalCode: row.terminalCode,\n terminalName: row.terminalName,\n status: row.status.toString(),\n terminalLongitude: row.terminalLongitude,\n terminalLatitude: row.terminalLatitude,\n remark: row.remark\n }\n this.updataTerminalData.dialogVisible = true\n },\n updateTerminalBtn(payload) {\n vehicleTerminalUpdate(payload).then(res => {\n if (res.code == 200) {\n this.$message({\n type: 'success',\n message: '修改成功!'\n });\n this.vehicleTerminalList(this.queryParams)\n this.updataTerminalData.dialogVisible = false\n } else {\n this.$message({\n type: 'error',\n message: res.msg\n });\n }\n })\n },\n vehicleTerminalList(params) {\n vehicleTerminalList(params).then(res => {\n if (res.code == 200) {\n this.tableData = res.data.records\n this.total = res.data.total\n }\n })\n },\n handleQuery() {\n this.vehicleTerminalList(this.queryParams)\n },\n reset() {\n this.queryParams = {\n pageNum: 1,\n pageSize: 10,\n terminalCode: '',\n terminalName: '',\n status: '',\n }\n this.vehicleTerminalList(this.queryParams)\n },\n exportBaseVehicleTerminal() {\n if (this.exportData.ids.length == 0) {\n return this.$message({\n type: 'error',\n message: '请选择要导出的终端信息!'\n });\n } else {\n exportBaseVehicleTerminal(this.exportData).then(res => {\n // const blob = new Blob([res], { type: 'text/plain;charset=utf-8' });\n // const url = window.URL.createObjectURL(blob);\n // const a = document.createElement('a');\n // a.href = url;\n // a.download = '车载终端信息.xlsx';\n // a.click();\n // window.URL.revokeObjectURL(url);\n\n\n if (res.type == \"application/json\") {\n const reader = new FileReader(); \n reader.readAsText(res, 'utf-8'); \n reader.onload = function () {\n const msg = JSON.parse(reader.result);\n if(msg.code == 200){\n const blob = new Blob([res], { type: 'text/plain;charset=utf-8' });\n const url = window.URL.createObjectURL(blob);\n const a = document.createElement('a');\n a.href = url;\n a.download = '车载终端信息.xlsx';\n a.click();\n window.URL.revokeObjectURL(url);\n } else{\n Message({\n type: 'error',\n message: msg.msg\n });\n } \n }\n }else{\n const blob = new Blob([res], { type: 'text/plain;charset=utf-8' });\n const url = window.URL.createObjectURL(blob);\n const a = document.createElement('a');\n a.href = url;\n a.download = '车载终端信息.xlsx';\n a.click();\n window.URL.revokeObjectURL(url);\n }\n\n\n\n })\n }\n },\n downloaExcel() {\n downloaExcel('/baseVehicleTerminal/downloaExcel').then(res => {\n const blob = new Blob([res], { type: 'text/plain;charset=utf-8' });\n const url = window.URL.createObjectURL(blob);\n const a = document.createElement('a');\n a.href = url;\n a.download = '车载终端信息模板.xlsx';\n a.click();\n window.URL.revokeObjectURL(url);\n })\n },\n importLoadIn: function () {\n this.uploadDialog = true\n },\n uploadFileList(file) {\n if (file.status === 'ready') {\n this.fileList.push(file)\n if (this.fileList.length > 1) {\n this.fileList.splice(0, 1)\n }\n }\n },\n //导入\n httpRequest() {\n let formData = new FormData();\n // formData.append('file', this.dataForm.file.raw);\n formData.append('file', this.fileList[0].raw)\n let configHeaders = {\n headers: { \"Content-Type\": \"multipart/form-data\" }\n };\n importBaseVehicleTerminal(formData).then(res => {\n if (res.code == 200) {\n this.$message({\n type: 'success',\n message: '导入成功!'\n });\n let uid = this.fileList[0].raw.uid\n let idx = this.$refs.uploadFile.uploadFiles.findIndex(item => item.uid === uid)\n this.$refs.uploadFile.uploadFiles.splice(idx, 1)\n this.vehicleTerminalList(this.queryParams)\n this.uploadDialog = false\n } else {\n let uid = this.fileList[0].raw.uid\n let idx = this.$refs.uploadFile.uploadFiles.findIndex(item => item.uid === uid)\n this.$refs.uploadFile.uploadFiles.splice(idx, 1)\n this.$message({\n type: 'error',\n message: res.msg\n });\n }\n })\n },\n delTerminal(scope) {\n this.$confirm('确定要删除吗?', '信息提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(() => {\n vehicleTerminaleDelete(scope.id).then(res => {\n if (res.code == 200) {\n this.vehicleTerminalList(this.queryParams)\n this.$message({\n type: 'success',\n message: '删除成功!'\n });\n } else {\n this.$message({\n type: 'error',\n message: res.msg\n });\n }\n })\n }).catch(() => {\n this.$message({\n type: 'info',\n message: '已取消删除'\n });\n });\n },\n handleSelectionChange(v) {\n let delTerminalList = ''\n this.exportData.ids = []\n v.forEach(element => {\n delTerminalList += element.id + ','\n this.exportData.ids.push(element.id)\n });\n delTerminalList = delTerminalList.slice(0, delTerminalList.length - 1)\n this.delTerminalList = delTerminalList\n },\n batchDelTerminal() {\n if (this.delTerminalList.length == 0) {\n return this.$message({\n type: 'error',\n message: '请选择要删除的机车信息!'\n });\n }\n this.$confirm('确定要删除吗?', '信息提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(() => {\n vehicleTerminaleDelete(this.delTerminalList).then(res => {\n if (res.code == 200) {\n this.vehicleTerminalList(this.queryParams)\n this.$message({\n type: 'success',\n message: '删除成功!'\n });\n } else {\n this.$message({\n type: 'error',\n message: res.msg\n });\n }\n })\n }).catch(() => {\n this.$message({\n type: 'info',\n message: '已取消删除'\n });\n });\n }\n }\n}\n</script>\n \n<style lang=\"scss\" scoped>\n.dashboard {\n &-container {\n margin: 30px;\n }\n\n &-text {\n font-size: 30px;\n line-height: 46px;\n }\n}\n\n.dashboard-container {\n .search-content {\n width: 100%;\n height: 74px;\n background-color: #fff;\n display: flex;\n align-items: center;\n padding-left: 10px;\n\n .el-input {\n margin: 0 10px;\n }\n\n .el-select {\n margin: 0 10px;\n }\n\n .search-btn {\n display: flex;\n align-items: center;\n height: 100%;\n margin-left: 10px;\n\n div {\n // margin: 0 6px;\n display: inline-block;\n width: 80px;\n height: 40px;\n border-radius: 2px;\n font-size: 14px;\n line-height: 40px;\n text-align: center;\n }\n\n div:hover {\n cursor: pointer;\n }\n\n .search {\n margin-right: 10px;\n background-color: #2766DD;\n color: #F7F8FB;\n }\n\n .search:hover {\n background-color: #4D85F4;\n }\n\n .reset {\n color: #333334;\n border: 1px solid #D7D7D7;\n }\n\n .reset:hover {\n color: #1F9FFF;\n border: 1px solid #1F9FFF;\n }\n }\n }\n\n .table-content {\n margin-top: 15px;\n width: 100%;\n background-color: #fff;\n padding: 0 20px 20px;\n\n .btn {\n margin: 15px 20px 15px 0;\n cursor: pointer;\n float: left;\n text-align: center;\n width: 98px;\n height: 34px;\n border-radius: 2px;\n border: 1px solid #ABC7FD;\n line-height: 34px;\n font-weight: 400;\n font-size: 14px;\n color: #2250C8;\n background-color: #E7EEFF;\n }\n\n .btn:hover {\n color: #FFFFFF;\n background-color: #2250C8;\n border: 1px solid #2250C8;\n }\n\n .btn:active {\n color: #FFFFFF;\n background-color: #194DA4;\n border: 1px solid #194DA4;\n }\n\n\n .startUsing {\n width: 60px;\n height: 25px;\n margin: 14.5px auto 0;\n line-height: 25px;\n text-align: center;\n font-size: 12px;\n color: #fff;\n border-radius: 5px;\n background-color: #00974B;\n }\n\n .Deactivate {\n width: 60px;\n height: 25px;\n margin: 14.5px auto 0;\n line-height: 25px;\n text-align: center;\n font-size: 12px;\n color: #fff;\n border-radius: 5px;\n background-color: #FF9933;\n }\n\n .operateBtn {\n display: flex;\n justify-content: center;\n color: #2866DD;\n\n div {\n font-size: 14px;\n margin: 0 5px;\n cursor: pointer;\n }\n }\n\n .pagination {\n margin: 10px 0;\n width: 100%;\n height: 20px;\n\n .el-pagination {\n float: right;\n margin: 10px 0;\n }\n }\n }\n}\n\n\n.operateBtn {\n display: flex;\n justify-content: center;\n color: #2866DD;\n\n div {\n font-size: 16px;\n margin: 0 5px;\n cursor: pointer;\n }\n}\n\n.el-tooltip__popper {\n max-width: 30%;\n padding-bottom: 5px !important;\n display: -webkit-box;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-line-clamp: 15;\n -webkit-box-orient: vertical;\n\n}\n\n.el-tooltip__popper,\n.el-tooltip__popper.is-dark {\n background: rgb(48, 65, 86) !important;\n color: #fff !important;\n line-height: 24px;\n}\n\n.hxj {\n height: 46px;\n line-height: 46px;\n text-align: center;\n}\n\n.xzmba {\n color: #2766dd;\n text-decoration: underline;\n cursor: pointer;\n}\n</style>\n "]}]}
|