1 line
15 KiB
JSON
1 line
15 KiB
JSON
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\personData\\student.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\personData\\student.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport mixinViewModule from '@/mixins/view-module';\nimport addOrUpdate from \"./student/student-add-or-update\";\nimport viewStudent from \"./student/student-view\";\nimport { getDictLabel } from '@/utils';\nimport upload from '@/components/public/upload-excel-or-img';\nexport default {\n mixins: [mixinViewModule],\n components: {\n addOrUpdate: addOrUpdate,\n viewStudent: viewStudent,\n upload: upload\n },\n data: function data() {\n return {\n mixinViewModuleOptions: {\n getDataListURL: '/system/scstudents/page',\n deleteURL: '/system/scstudents',\n getDataListIsPage: true\n },\n limit: 6,\n dataForm: {\n scStuname: '',\n scNo: ''\n },\n dataList: [],\n checkList: [],\n loading: false\n };\n },\n computed: {\n previewList: function previewList() {\n var _this = this;\n\n return this.dataList.map(function (item) {\n return _this.$ImgServerUrl + item.scPhotoimg;\n });\n }\n },\n methods: {\n // 选择需要导出的人员\n checkListHandle: function checkListHandle(param) {\n this.checkList = param.map(function (item) {\n return item.scStdid;\n });\n console.log(this.checkList);\n },\n // 导出\n exportHandle: function exportHandle() {\n var _this2 = this;\n\n if (this.checkList.length === 0) {\n return this.$message.warning(\"\\u8BF7\\u52FE\\u9009\\u9700\\u8981\\u5BFC\\u51FA\\u7684\\u6570\\u636E\");\n }\n\n this.loading = true;\n this.$http.post(\"/system/scstudents/pageExport\", this.checkList, {\n responseType: \"blob\"\n }).then(function (res) {\n var content = res.data;\n var blob = new Blob([content], {\n type: \"application/vnd.ms-excel;charset=utf-8\"\n });\n var fileName = \"学生信息\";\n\n if (\"download\" in document.createElement(\"a\")) {\n var elink = document.createElement(\"a\");\n elink.download = fileName;\n elink.style.display = \"none\";\n elink.href = URL.createObjectURL(blob);\n document.body.appendChild(elink);\n elink.click();\n URL.revokeObjectURL(elink.href);\n document.body.removeChild(elink);\n } else {\n navigator.msSaveBlob(blob, fileName);\n }\n }).catch(function () {}).finally(function () {\n _this2.loading = false;\n });\n },\n addStudent: function addStudent() {\n this.$refs['addOrUpdate'].init();\n },\n search: function search() {\n this.page = 1;\n this.query();\n },\n resetQuery: function resetQuery() {\n this.page = 1;\n this.dataForm = {\n scStuname: '',\n scNo: ''\n };\n this.query();\n },\n viewHandle: function viewHandle(row) {\n this.$refs['viewStudent'].init(row);\n },\n editHandle: function editHandle(row) {\n this.$refs['addOrUpdate'].init(row);\n },\n trackHandle: function trackHandle(row) {\n this.$router.push({\n path: \"/xwyl-track\",\n query: {\n tid: row.scUwbid\n }\n });\n },\n uploadExcel: function uploadExcel() {\n this.$refs['studentUploadExcel'].init();\n },\n uploadImg: function uploadImg() {\n this.$refs['studentUploadImg'].init();\n },\n formatterEducation: function formatterEducation(row) {\n return getDictLabel('education', row.scEducation);\n },\n formatterSex: function formatterSex(row) {\n return getDictLabel('gender', row.scSex);\n }\n }\n};",{"version":3,"sources":["student.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DA,OAAA,eAAA,MAAA,sBAAA;AACA,OAAA,WAAA;AACA,OAAA,WAAA;AACA,SACA,YADA,QAEA,SAFA;AAGA,OAAA,MAAA,MAAA,yCAAA;AAEA,eAAA;AACA,EAAA,MAAA,EAAA,CAAA,eAAA,CADA;AAEA,EAAA,UAAA,EAAA;AACA,IAAA,WAAA,EAAA,WADA;AAEA,IAAA,WAAA,EAAA,WAFA;AAGA,IAAA,MAAA,EAAA;AAHA,GAFA;AAOA,EAAA,IAPA,kBAOA;AACA,WAAA;AACA,MAAA,sBAAA,EAAA;AACA,QAAA,cAAA,EAAA,yBADA;AAEA,QAAA,SAAA,EAAA,oBAFA;AAGA,QAAA,iBAAA,EAAA;AAHA,OADA;AAMA,MAAA,KAAA,EAAA,CANA;AAOA,MAAA,QAAA,EAAA;AACA,QAAA,SAAA,EAAA,EADA;AAEA,QAAA,IAAA,EAAA;AAFA,OAPA;AAWA,MAAA,QAAA,EAAA,EAXA;AAYA,MAAA,SAAA,EAAA,EAZA;AAaA,MAAA,OAAA,EAAA;AAbA,KAAA;AAeA,GAvBA;AAwBA,EAAA,QAAA,EAAA;AACA,IAAA,WADA,yBACA;AAAA;;AACA,aAAA,KAAA,QAAA,CAAA,GAAA,CAAA,UAAA,IAAA,EAAA;AACA,eAAA,KAAA,CAAA,aAAA,GAAA,IAAA,CAAA,UAAA;AACA,OAFA,CAAA;AAGA;AALA,GAxBA;AA+BA,EAAA,OAA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AAA,QAAA,EAAA,GAAA,CAAA,KAAA,CAAA;AACA;AA/EA;AA/BA,CAAA","sourcesContent":["<template>\n\t<el-card shadow=\"never\" class=\"aui-card--fill\">\n\t\t<el-form ref=\"ruleForm\" :model=\"dataForm\" label-width=\"80px\" inline>\n\t\t\t<el-form-item label=\"姓名\" prop=\"scStuname\">\n\t\t\t\t<el-input v-model=\"dataForm.scStuname\" placeholder=\"请输入\" clearable></el-input>\n\t\t\t</el-form-item>\n\t\t\t<el-form-item label=\"学号\" prop=\"scNo\">\n\t\t\t\t<el-input v-model=\"dataForm.scNo\" placeholder=\"请输入\" clearable></el-input>\n\t\t\t</el-form-item>\n\t\t\t<el-form-item>\n\t\t\t\t<el-button @click=\"search\">查询</el-button>\n\t\t\t\t<el-button type=\"warning\" @click=\"resetForm('ruleForm')\">重置</el-button>\n\t\t\t\t<el-button type=\"primary\" @click=\"addStudent\">新建</el-button>\n\t\t\t\t<el-button type=\"success\" @click=\"uploadExcel\">导入信息</el-button>\n\t\t\t\t<el-button type=\"success\" @click=\"uploadImg\" v-if=\"$hasPermission('system:scstudents:importImg')\">导入图片</el-button>\n\t\t\t\t<el-button type=\"success\" @click=\"exportHandle\" v-loading=\"loading\">导出信息</el-button>\n\t\t\t</el-form-item>\n\t\t</el-form>\n\t\t<el-table :data=\"dataList\" @selection-change=\"checkListHandle\">\n\t\t\t<el-table-column type=\"selection\" header-align=\"center\" align=\"center\" width=\"50\"></el-table-column>\n\t\t\t<el-table-column type=\"index\" label=\"序号\" width=\"100\" align=\"center\"></el-table-column>\n\t\t\t<el-table-column label=\"照片\">\n\t\t\t\t<template slot-scope=\"scope\">\n\t\t\t\t\t<el-image class=\"student-img\" :src=\"$ImgServerUrl+scope.row.scPhotoimg\" :preview-src-list=\"previewList\">\n\t\t\t\t\t\t<div slot=\"error\" class=\"image-slot\">\n\t\t\t\t\t\t\t<img class=\"student-img\" src=\"../../../assets/img/person.jpg\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</el-image>\n\t\t\t\t</template>\n\t\t\t</el-table-column>\n\t\t\t<el-table-column prop=\"scStuname\" label=\"姓名\" show-overflow-tooltip></el-table-column>\n\t\t\t<el-table-column prop=\"scNo\" label=\"学号\" show-overflow-tooltip></el-table-column>\n\t\t\t<el-table-column prop=\"scSex\" label=\"性别\" :formatter=\"formatterSex\" show-overflow-tooltip></el-table-column>\n\t\t\t<el-table-column prop=\"scPhonenum\" label=\"联系电话\" show-overflow-tooltip></el-table-column>\n\t\t\t<el-table-column prop=\"scEducation\" label=\"学历\" :formatter=\"formatterEducation\" show-overflow-tooltip></el-table-column>\n\t\t\t<el-table-column label=\"操作\">\n\t\t\t\t<template slot-scope=\"scope\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<el-button type=\"text\" @click=\"viewHandle(scope.row)\">详情</el-button>\n\t\t\t\t\t\t<el-button type=\"text\" @click=\"editHandle(scope.row)\">修改</el-button>\n\t\t\t\t\t\t<el-button type=\"text\" v-if=\"scope.row.scUwbid\" @click=\"trackHandle(scope.row)\">轨迹跟踪</el-button>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</el-table-column>\n\t\t</el-table>\n\t\t<el-pagination :current-page=\"page\" :page-sizes=\"[6,10, 20, 50, 100,500]\" :page-size=\"limit\" :total=\"total\" layout=\"total, sizes, prev, pager, next, jumper\"\n\t\t @size-change=\"pageSizeChangeHandle\" @current-change=\"pageCurrentChangeHandle\">\n\t\t</el-pagination>\n\t\t<!-- 新增修改 -->\n\t\t<add-or-update ref=\"addOrUpdate\"></add-or-update>\n\t\t<!-- 查看 -->\n\t\t<view-student ref=\"viewStudent\"></view-student>\n\t\t<!-- 批量上传图片 -->\n\t\t<upload ref=\"studentUploadImg\" tips=\"支持jpg、png文件,文件大小不超过500kb,文件命名方式“学号_姓名”\" accept=\"image/png,image/jpeg,image/jpg\"\n\t\t upload-url=\"/system/scstudents/importImg\"></upload>\n\t\t<!-- 批量上传信息 -->\n\t\t<upload ref=\"studentUploadExcel\" template-url=\"./template/学生信息导入表模板.xls\" upload-url=\"/system/scstudents/importInfoExcel\"></upload>\n\t</el-card>\n</template>\n\n<script>\n\timport mixinViewModule from '@/mixins/view-module'\n\timport addOrUpdate from './student/student-add-or-update'\n\timport viewStudent from './student/student-view'\n\timport {\n\t\tgetDictLabel\n\t} from '@/utils'\n\timport upload from '@/components/public/upload-excel-or-img'\n\n\texport default {\n\t\tmixins: [mixinViewModule],\n\t\tcomponents: {\n\t\t\taddOrUpdate,\n\t\t\tviewStudent,\n\t\t\tupload,\n\t\t},\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tmixinViewModuleOptions: {\n\t\t\t\t\tgetDataListURL: '/system/scstudents/page',\n\t\t\t\t\tdeleteURL: '/system/scstudents',\n\t\t\t\t\tgetDataListIsPage: true,\n\t\t\t\t},\n\t\t\t\tlimit: 6,\n\t\t\t\tdataForm: {\n\t\t\t\t\tscStuname: '',\n\t\t\t\t\tscNo: ''\n\t\t\t\t},\n\t\t\t\tdataList: [],\n\t\t\t\tcheckList: [],\n\t\t\t\tloading: false,\n\t\t\t}\n\t\t},\n\t\tcomputed: {\n\t\t\tpreviewList() {\n\t\t\t\treturn this.dataList.map(item => {\n\t\t\t\t\treturn this.$ImgServerUrl + item.scPhotoimg\n\t\t\t\t})\n\t\t\t},\n\t\t},\n\t\tmethods: {\n\t\t\t// 选择需要导出的人员\n\t\t\tcheckListHandle(param) {\n\t\t\t\tthis.checkList = param.map(item => {\n\t\t\t\t\treturn item.scStdid\n\t\t\t\t})\n\t\t\t\tconsole.log(this.checkList)\n\t\t\t},\n\t\t\t// 导出\n\t\t\texportHandle() {\n\t\t\t\tif (this.checkList.length === 0) {\n\t\t\t\t\treturn this.$message.warning(`请勾选需要导出的数据`)\n\t\t\t\t}\n\t\t\t\tthis.loading = true\n\t\t\t\tthis.$http.post(`/system/scstudents/pageExport`, this.checkList, {\n\t\t\t\t\tresponseType: \"blob\"\n\t\t\t\t}).then(res => {\n\t\t\t\t\tconst content = res.data;\n\t\t\t\t\tconst blob = new Blob([content], {\n\t\t\t\t\t\ttype: \"application/vnd.ms-excel;charset=utf-8\"\n\t\t\t\t\t});\n\t\t\t\t\tconst fileName = \"学生信息\";\n\t\t\t\t\tif (\"download\" in document.createElement(\"a\")) {\n\t\t\t\t\t\tconst elink = document.createElement(\"a\");\n\t\t\t\t\t\telink.download = fileName;\n\t\t\t\t\t\telink.style.display = \"none\";\n\t\t\t\t\t\telink.href = URL.createObjectURL(blob);\n\t\t\t\t\t\tdocument.body.appendChild(elink);\n\t\t\t\t\t\telink.click();\n\t\t\t\t\t\tURL.revokeObjectURL(elink.href);\n\t\t\t\t\t\tdocument.body.removeChild(elink);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnavigator.msSaveBlob(blob, fileName);\n\t\t\t\t\t}\n\t\t\t\t}).catch(() => {}).finally(() => {\n\t\t\t\t\tthis.loading = false\n\t\t\t\t})\n\t\t\t},\n\n\t\t\taddStudent() {\n\t\t\t\tthis.$refs['addOrUpdate'].init()\n\t\t\t},\n\t\t\tsearch() {\n\t\t\t\tthis.page = 1;\n\t\t\t\tthis.query();\n\t\t\t},\n\t\t\tresetQuery() {\n\t\t\t\tthis.page = 1;\n\t\t\t\tthis.dataForm = {\n\t\t\t\t\tscStuname: '',\n\t\t\t\t\tscNo: ''\n\t\t\t\t};\n\t\t\t\tthis.query();\n\t\t\t},\n\t\t\tviewHandle(row) {\n\t\t\t\tthis.$refs['viewStudent'].init(row)\n\t\t\t},\n\t\t\teditHandle(row) {\n\t\t\t\tthis.$refs['addOrUpdate'].init(row)\n\t\t\t},\n\t\t\ttrackHandle(row) {\n\t\t\t\tthis.$router.push({\n\t\t\t\t\tpath: \"/xwyl-track\",\n\t\t\t\t\tquery: {\n\t\t\t\t\t\ttid: row.scUwbid\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\tuploadExcel() {\n\t\t\t\tthis.$refs['studentUploadExcel'].init()\n\t\t\t},\n\t\t\tuploadImg() {\n\t\t\t\tthis.$refs['studentUploadImg'].init()\n\t\t\t},\n\t\t\tformatterEducation(row) {\n\t\t\t\treturn getDictLabel('education', row.scEducation)\n\t\t\t},\n\t\t\tformatterSex(row) {\n\t\t\t\treturn getDictLabel('gender', row.scSex)\n\t\t\t}\n\t\t}\n\t}\n</script>\n<style lang=\"scss\" scoped>\n\t.el-table {\n\t\t.student-img {\n\t\t\tvertical-align: top;\n\t\t\twidth: 53px;\n\t\t\theight: 70px;\n\t\t}\n\t}\n</style>\n"],"sourceRoot":"src/views/modules/personData"}]} |