forked from zhurui/management
1 line
12 KiB
JSON
1 line
12 KiB
JSON
{"remainingRequest":"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\\staff.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\personData\\staff.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//\n//\n\nimport mixinViewModule from '@/mixins/view-module'\nimport addOrUpdate from './staff/staff-add-or-update'\nimport viewStaff from './staff/staff-view'\nimport {\n\tgetDictLabel\n} from '@/utils'\nimport upload from '@/components/public/upload-excel-or-img'\nexport default {\n\tmixins: [mixinViewModule],\n\tcomponents: {\n\t\taddOrUpdate,\n\t\tviewStaff,\n\t\tupload\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tmixinViewModuleOptions: {\n\t\t\t\tgetDataListURL: '/system/scworkersarchives/page',\n\t\t\t\tdeleteURL: '/system/scworkersarchives',\n\t\t\t\tgetDataListIsPage: true\n\t\t\t},\n\t\t\tlimit: 6,\n\t\t\tdataForm: {\n\t\t\t\tscWaname: '',\n\t\t\t\tscEmpno: ''\n\t\t\t},\n\t\t\tdataList: [],\n\t\t\tcheckList: [],\n\t\t\tloading: false,\n\t\t}\n\t},\n\tcomputed: {\n\t\tpreviewList() {\n\t\t\treturn this.dataList.map(item => {\n\t\t\t\treturn this.$ImgServerUrl + item.scPhotoimg\n\t\t\t})\n\t\t},\n\t},\n\tmethods: {\n\t\t// 选择需要导出的人员\n\t\tcheckListHandle(param) {\n\t\t\tthis.checkList = param.map(item => {\n\t\t\t\treturn item.scWaid\n\t\t\t})\n\t\t},\n\t\t// 导出\n\t\texportHandle() {\n\t\t\tif (this.checkList.length === 0) {\n\t\t\t\treturn this.$message.warning(`请勾选需要导出的数据`)\n\t\t\t}\n\t\t\tthis.loading = true\n\t\t\tthis.$http.post(`/system/scworkersarchives/pageExport`, this.checkList, {\n\t\t\t\tresponseType: \"blob\"\n\t\t\t}).then(res => {\n\t\t\t\tconst content = res.data;\n\t\t\t\tconst blob = new Blob([content], {\n\t\t\t\t\ttype: \"application/vnd.ms-excel;charset=utf-8\"\n\t\t\t\t});\n\t\t\t\tconst fileName = \"职工信息\";\n\t\t\t\tif (\"download\" in document.createElement(\"a\")) {\n\t\t\t\t\tconst elink = document.createElement(\"a\");\n\t\t\t\t\telink.download = fileName;\n\t\t\t\t\telink.style.display = \"none\";\n\t\t\t\t\telink.href = URL.createObjectURL(blob);\n\t\t\t\t\tdocument.body.appendChild(elink);\n\t\t\t\t\telink.click();\n\t\t\t\t\tURL.revokeObjectURL(elink.href);\n\t\t\t\t\tdocument.body.removeChild(elink);\n\t\t\t\t} else {\n\t\t\t\t\tnavigator.msSaveBlob(blob, fileName);\n\t\t\t\t}\n\t\t\t}).catch(() => {}).finally(() => {\n\t\t\t\tthis.loading = false\n\t\t\t})\n\t\t},\n\t\taddStaff() {\n\t\t\tthis.$refs['addOrUpdate'].init()\n\t\t},\n\t\tsearch() {\n\t\t\tthis.page = 1;\n\t\t\tthis.query();\n\t\t},\n\t\tresetQuery() {\n\t\t\tthis.page = 1;\n\t\t\tthis.dataForm = {\n\t\t\t\tscWaname: '',\n\t\t\t\tscEmpno: ''\n\t\t\t};\n\t\t\tthis.query();\n\t\t},\n\t\tviewHandle(row) {\n\t\t\tthis.$refs['viewStaff'].init(row)\n\t\t},\n\t\teditHandle(row) {\n\t\t\tthis.$refs['addOrUpdate'].init(row)\n\t\t},\n\t\tuploadExcel() {\n\t\t\tthis.$refs['staffUploadExcel'].init()\n\t\t},\n\t\tuploadImg() {\n\t\t\tthis.$refs['staffUploadImg'].init()\n\t\t},\n\t\ttrackHandle(row) {\n\t\t\tthis.$router.push({\n\t\t\t\tpath: \"/xwyl-track\",\n\t\t\t\tquery: {\n\t\t\t\t\ttid: row.scUwbid\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tformatterType(row) {\n\t\t\treturn getDictLabel('employType', row.scEmptype)\n\t\t},\n\t\tformatterSex(row) {\n\t\t\treturn getDictLabel('gender', row.scWasex)\n\t\t}\n\t}\n}\n",{"version":3,"sources":["staff.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"staff.vue","sourceRoot":"src/views/modules/personData","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=\"scWaname\">\n\t\t\t\t<el-input v-model=\"dataForm.scWaname\" placeholder=\"请输入\" clearable></el-input>\n\t\t\t</el-form-item>\n\t\t\t<el-form-item label=\"职工编号\" prop=\"scEmpno\">\n\t\t\t\t<el-input v-model=\"dataForm.scEmpno\" 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=\"addStaff\">新建</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:scworkersarchives: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=\"scWaname\" label=\"姓名\" show-overflow-tooltip></el-table-column>\n\t\t\t<el-table-column prop=\"scEmpno\" label=\"职工编号\" show-overflow-tooltip></el-table-column>\n\t\t\t<el-table-column prop=\"scWasex\" label=\"性别\" :formatter=\"formatterSex\" show-overflow-tooltip></el-table-column>\n\t\t\t<el-table-column prop=\"scHiredate\" label=\"入职时间\" show-overflow-tooltip></el-table-column>\n\t\t\t<el-table-column prop=\"scEmptype\" label=\"类型\" :formatter=\"formatterType\" 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-staff ref=\"viewStaff\"></view-staff>\n\t\t<!-- 批量上传图片 -->\n\t\t<upload ref=\"staffUploadImg\" tips=\"支持jpg、png文件,文件大小不超过500kb,文件命名方式“工号_姓名”\" accept=\"image/png,image/jpeg,image/jpg\"\n\t\t upload-url=\"/system/scworkersarchives/importImg\"></upload>\n\t\t<!-- 批量上传信息 -->\n\t\t<upload ref=\"staffUploadExcel\" template-url=\"./template/教职工信息导入表模板.xls\" upload-url=\"/system/scworkersarchives/importInfoExcel\"></upload>\n\n\t</el-card>\n</template>\n\n<script>\n\timport mixinViewModule from '@/mixins/view-module'\n\timport addOrUpdate from './staff/staff-add-or-update'\n\timport viewStaff from './staff/staff-view'\n\timport {\n\t\tgetDictLabel\n\t} from '@/utils'\n\timport upload from '@/components/public/upload-excel-or-img'\n\texport default {\n\t\tmixins: [mixinViewModule],\n\t\tcomponents: {\n\t\t\taddOrUpdate,\n\t\t\tviewStaff,\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/scworkersarchives/page',\n\t\t\t\t\tdeleteURL: '/system/scworkersarchives',\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\tscWaname: '',\n\t\t\t\t\tscEmpno: ''\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.scWaid\n\t\t\t\t})\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/scworkersarchives/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\t\t\taddStaff() {\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\tscWaname: '',\n\t\t\t\t\tscEmpno: ''\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['viewStaff'].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\tuploadExcel() {\n\t\t\t\tthis.$refs['staffUploadExcel'].init()\n\t\t\t},\n\t\t\tuploadImg() {\n\t\t\t\tthis.$refs['staffUploadImg'].init()\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\tformatterType(row) {\n\t\t\t\treturn getDictLabel('employType', row.scEmptype)\n\t\t\t},\n\t\t\tformatterSex(row) {\n\t\t\t\treturn getDictLabel('gender', row.scWasex)\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"]}]} |