| | |
| | | |
| | | # 路由懒加载 |
| | | VUE_CLI_BABEL_TRANSPILE_MODULES = true |
| | | |
| | | # 本地环境ip+端口 |
| | | VUE_BASE_URL = '' |
| | |
| | | |
| | | # LIMS实验室管理系统/生产环境 |
| | | VUE_APP_BASE_API = '/prod-api' |
| | | |
| | | # 生产环境ip+端口 |
| | | VUE_BASE_URL = '' |
| | |
| | | }); |
| | | } |
| | | |
| | | // 奖惩记录 导出 |
| | | export function rewardPunishmentExport(query) { |
| | | return request({ |
| | | url: "/personRewardPunishmentRecord/rewardPunishmentExport", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @desc 工作履历 |
| | | */ |
| | |
| | | <template> |
| | | <div> |
| | | <!-- 表格 --> |
| | | <el-table |
| | | ref="multipleTable" |
| | | v-loading="tableLoading" |
| | | :border="border" |
| | | :data="tableData" |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" |
| | | :height="height" |
| | | :highlight-current-row="highlightCurrentRow" |
| | | :row-class-name="rowClassName" |
| | | :row-style="rowStyle" |
| | | :row-key="rowKey" |
| | | :span-method="spanMethod" |
| | | :stripe="stripe" |
| | | style="width: 100%" |
| | | tooltip-effect="dark" |
| | | @row-click="rowClick" |
| | | @current-change="currentChange" |
| | | @selection-change="handleSelectionChange" |
| | | class="lims-table" |
| | | > |
| | | <el-table-column |
| | | align="center" |
| | | type="selection" |
| | | width="55" |
| | | v-if="isSelection" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | label="序号" |
| | | type="index" |
| | | width="60" |
| | | :index="indexMethod" |
| | | /> |
| | | <el-table ref="multipleTable" v-loading="tableLoading" :border="border" :data="tableData" |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" :height="height" |
| | | :highlight-current-row="highlightCurrentRow" :row-class-name="rowClassName" :row-style="rowStyle" |
| | | :row-key="rowKey" :span-method="spanMethod" :stripe="stripe" style="width: 100%" tooltip-effect="dark" |
| | | @row-click="rowClick" @current-change="currentChange" @selection-change="handleSelectionChange" |
| | | class="lims-table"> |
| | | <el-table-column align="center" type="selection" width="55" v-if="isSelection" /> |
| | | <el-table-column align="center" label="序号" type="index" width="60" :index="indexMethod" /> |
| | | |
| | | <el-table-column |
| | | v-for="(item, index) in column" |
| | | :key="index" |
| | | :column-key="item.columnKey" |
| | | :filter-method="item.filterHandler" |
| | | :filter-multiple="item.filterMultiple" |
| | | :filtered-value="item.filteredValue" |
| | | :filters="item.filters" |
| | | :fixed="item.fixed" |
| | | :label="item.label" |
| | | :min-width="item.minWidth" |
| | | :prop="item.prop" |
| | | :show-overflow-tooltip=" |
| | | item.dataType === 'action' || item.dataType === 'slot' ? false : true |
| | | " |
| | | :sortable="item.sortable ? true : false" |
| | | :type="item.type" |
| | | align="center" |
| | | :width="item.dataType == 'action' ? btnWidth : item.width" |
| | | > |
| | | <el-table-column v-for="(item, index) in column" :key="index" :column-key="item.columnKey" |
| | | :filter-method="item.filterHandler" :filter-multiple="item.filterMultiple" :filtered-value="item.filteredValue" |
| | | :filters="item.filters" :fixed="item.fixed" :label="item.label" :min-width="item.minWidth" :prop="item.prop" |
| | | :show-overflow-tooltip="item.dataType === 'action' || item.dataType === 'slot' ? false : true |
| | | " :sortable="item.sortable ? true : false" :type="item.type" align="center" |
| | | :width="item.dataType == 'action' ? btnWidth : item.width"> |
| | | <!-- <div class="123" v-if="item.type == ''"> --> |
| | | <template |
| | | v-if="item.hasOwnProperty('colunmTemplate')" |
| | | :slot="item.colunmTemplate" |
| | | slot-scope="scope" |
| | | > |
| | | <slot |
| | | v-if="item.theadSlot" |
| | | :index="index" |
| | | :name="item.theadSlot" |
| | | :row="scope.row" |
| | | /> |
| | | <template v-if="item.hasOwnProperty('colunmTemplate')" :slot="item.colunmTemplate" slot-scope="scope"> |
| | | <slot v-if="item.theadSlot" :index="index" :name="item.theadSlot" :row="scope.row" /> |
| | | </template> |
| | | |
| | | <template slot-scope="scope"> |
| | | <!-- 插槽 --> |
| | | <div v-if="item.dataType == 'slot'"> |
| | | <slot |
| | | v-if="item.slot" |
| | | :index="scope.$index" |
| | | :name="item.slot" |
| | | :row="scope.row" |
| | | /> |
| | | <slot v-if="item.slot" :index="scope.$index" :name="item.slot" :row="scope.row" /> |
| | | </div> |
| | | <!-- 进度条 --> |
| | | <div v-else-if="item.dataType == 'progress'"> |
| | |
| | | </div> |
| | | <!-- 图片 --> |
| | | <div v-else-if="item.dataType == 'image'"> |
| | | <img |
| | | :src="javaApi + '/img/' + scope.row[item.prop]" |
| | | alt="" |
| | | style="width: 40px; height: 40px; margin-top: 10px" |
| | | /> |
| | | <img :src="javaApi + '/img/' + scope.row[item.prop]" alt="" |
| | | style="width: 40px; height: 40px; margin-top: 10px" /> |
| | | </div> |
| | | |
| | | <!-- tag --> |
| | | <div v-else-if="item.dataType == 'tag'"> |
| | | <el-tag |
| | | v-if=" |
| | | <el-tag v-if=" |
| | | typeof dataTypeFn(scope.row[item.prop], item.formatData) == |
| | | 'string' |
| | | " |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)" |
| | | >{{ scope.row[item.prop] | formatters(item.formatData) }}</el-tag |
| | | > |
| | | <el-tag |
| | | v-for="(tag, index) in dataTypeFn( |
| | | " :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)">{{ scope.row[item.prop] | |
| | | formatters(item.formatData) }}</el-tag> |
| | | <el-tag v-for="(tag, index) in dataTypeFn( |
| | | scope.row[item.prop], |
| | | item.formatData |
| | | )" |
| | | v-else-if=" |
| | | )" v-else-if=" |
| | | typeof dataTypeFn(scope.row[item.prop], item.formatData) == |
| | | 'object' |
| | | " |
| | | :key="index" |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(tag, item.formatType)" |
| | | >{{ |
| | | " :key="index" :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(tag, item.formatType)">{{ |
| | | item.tagGroup |
| | | ? tag[item.tagGroup.label] |
| | | ? tag[item.tagGroup.label] |
| | | : tag |
| | | : tag |
| | | }}</el-tag |
| | | > |
| | | <el-tag |
| | | v-else |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)" |
| | | >{{ scope.row[item.prop] | formatters(item.formatData) }}</el-tag |
| | | > |
| | | }}</el-tag> |
| | | <el-tag v-else :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)">{{ scope.row[item.prop] | |
| | | formatters(item.formatData) }}</el-tag> |
| | | </div> |
| | | |
| | | <!-- 按钮 --> |
| | | <div |
| | | v-else-if="item.dataType == 'action'" |
| | | :style="`width:${getWidth(item.operation, scope.row)}`" |
| | | > |
| | | <div v-else-if="item.dataType == 'action'" :style="`width:${getWidth(item.operation, scope.row)}`"> |
| | | <template v-for="(o, key) in item.operation"> |
| | | <el-button |
| | | v-show="o.type != 'upload'" |
| | | size="mini" |
| | | v-if="o.showHide ? o.showHide(scope.row) : true" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | :icon="iconFn(o)" |
| | | :plain="o.plain" |
| | | :style="{ color: o.name === '删除' ? '#f56c6c' : o.color }" |
| | | :type="o.type | typeFn(scope.row)" |
| | | @click="o.clickFun(scope.row)" |
| | | :key="key" |
| | | > |
| | | <el-button v-show="o.type != 'upload'" size="mini" v-if="o.showHide ? o.showHide(scope.row) : true" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" :icon="iconFn(o)" :plain="o.plain" |
| | | :style="{ color: o.name === '删除' ? '#f56c6c' : o.color }" :type="o.type | typeFn(scope.row)" |
| | | @click="o.clickFun(scope.row)" :key="key"> |
| | | {{ o.name }} |
| | | </el-button> |
| | | <el-upload |
| | | :action="javaApi + o.url" |
| | | size="mini" |
| | | ref="upload" |
| | | :multiple="o.multiple ? o.multiple : false" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | :accept=" |
| | | o.accept |
| | | <el-upload :action="javaApi + o.url" size="mini" ref="upload" :multiple="o.multiple ? o.multiple : false" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept |
| | | ? o.accept |
| | | : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | | " |
| | | v-if="o.type == 'upload' && o.url" |
| | | style="display: inline-block; width: 50px" |
| | | :data="o.data ? o.data(scope.row) : {}" |
| | | :before-upload=" |
| | | o.beforeUpload ? o.beforeUpload(scope.row) : () => true |
| | | " |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" |
| | | :headers="uploadHeader" |
| | | :on-error="onError" |
| | | :on-exceed="onExceed" |
| | | :on-success="handleSuccessUp" |
| | | :show-file-list="false" |
| | | :key="key" |
| | | > |
| | | <el-button |
| | | :size="o.size ? o.size : 'small'" |
| | | type="text" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | >{{ o.name }}</el-button |
| | | > |
| | | " v-if="o.type == 'upload' && o.url" style="display: inline-block; width: 50px" |
| | | :data="o.data ? o.data(scope.row) : {}" :before-upload="o.beforeUpload ? o.beforeUpload(scope.row) : () => true |
| | | " v-show="o.showHide ? o.showHide(scope.row) : true" :headers="uploadHeader" :on-error="onError" |
| | | :on-exceed="onExceed" :on-success="handleSuccessUp" :show-file-list="false" :key="key"> |
| | | <el-button :size="o.size ? o.size : 'small'" type="text" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button> |
| | | </el-upload> |
| | | <el-upload |
| | | action="#" |
| | | :on-change=" |
| | | (file, fileList) => o.clickFun(scope.row, file, fileList) |
| | | " |
| | | :multiple="o.multiple ? o.multiple : false" |
| | | :limit="o.limit ? o.limit : 1" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | :accept=" |
| | | o.accept |
| | | <el-upload action="#" :on-change="(file, fileList) => o.clickFun(scope.row, file, fileList) |
| | | " :multiple="o.multiple ? o.multiple : false" :limit="o.limit ? o.limit : 1" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept |
| | | ? o.accept |
| | | : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | | " |
| | | v-if="o.type == 'upload' && !o.url" |
| | | style="display: inline-block; width: 50px" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" |
| | | :auto-upload="false" |
| | | :on-exceed="onExceed" |
| | | :show-file-list="false" |
| | | :key="key" |
| | | > |
| | | <el-button |
| | | :size="o.size ? o.size : 'small'" |
| | | type="text" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | >{{ o.name }}</el-button |
| | | > |
| | | " v-if="o.type == 'upload' && !o.url" style="display: inline-block; width: 50px" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" :auto-upload="false" :on-exceed="onExceed" |
| | | :show-file-list="false" :key="key"> |
| | | <el-button :size="o.size ? o.size : 'small'" type="text" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button> |
| | | </el-upload> |
| | | </template> |
| | | </div> |
| | | <!-- 可点击的文字 --> |
| | | <div |
| | | v-else-if="item.dataType == 'link'" |
| | | class="cell" |
| | | style="width: 100%" |
| | | @click="goLink(scope.row, item.linkEvent)" |
| | | > |
| | | <div v-else-if="item.dataType == 'link'" class="cell" style="width: 100%" |
| | | @click="goLink(scope.row, item.linkEvent)"> |
| | | <span class="link" v-if="!item.formatData"> |
| | | {{ scope.row[item.prop] }} |
| | | </span> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | v-if="page" |
| | | v-show="page.total > 0" |
| | | :total="page.total" |
| | | :layout="page.layout" |
| | | :page.sync="page.current" |
| | | :limit.sync="page.size" |
| | | @pagination="pagination" |
| | | style="background-color: #fff" |
| | | /> |
| | | <pagination v-if="page" v-show="page.total > 0" :total="page.total" :layout="page.layout" :page.sync="page.current" |
| | | :limit.sync="page.size" @pagination="pagination" style="background-color: #fff" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable :column="columnData" :height="'calc(100vh - 21em)'" :table-data="tableData" |
| | | <limsTable :column="columnData" :height="'calc(100vh - 22em)'" :table-data="tableData" |
| | | :table-loading="loading" style="margin-top: 18px; padding: 0 15px;" :page="page" |
| | | @pagination="pagination"></limsTable> |
| | | </template> |
| | |
| | | tableData: [], |
| | | page: { |
| | | current: 1, |
| | | pageSize: 20, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | loading: false |
| | |
| | | const params = this.isDepartment ? { |
| | | departLimsId: this.departId, |
| | | current: this.page.current, |
| | | size: this.page.pageSize |
| | | size: this.page.size |
| | | } : { |
| | | userId: this.departId, |
| | | current: this.page.current, |
| | | size: this.page.pageSize |
| | | size: this.page.size |
| | | } |
| | | const { code, data } = await personPersonCommunicationAbilityPage(params) |
| | | if (code == 200) { |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | let formData = new FormData() |
| | | formData.append('id', id) |
| | | const { code } = await deletePersonCommunicationAbility(formData) |
| | | const { code } = await deletePersonCommunicationAbility({ id }) |
| | | if (code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid === true || saveState !== '1submit') { |
| | | // 给当前环节设置创建人与时间 |
| | | let user = JSON.parse(localStorage.getItem('user')); |
| | | const dateTime = dateFormat(new Date()); |
| | | // 获取当前环节操作人与日期 |
| | | switch (this.currentStep) { |
| | | case 0: |
| | | this.form.submittingOperator = user.name; |
| | | this.form.submittingOperator = this.$store.state.user.name; |
| | | this.form.submittingDate = dateTime; |
| | | break; |
| | | case 1: |
| | | this.form.incumbentOperator = user.name; |
| | | this.form.incumbentOperator = this.$store.state.user.name; |
| | | this.form.incumbentDate = dateTime; |
| | | break; |
| | | case 2: |
| | | this.form.supervisorOperator = user.name; |
| | | this.form.supervisorOperator = this.$store.state.user.name; |
| | | this.form.supervisorDate = dateTime; |
| | | break; |
| | | default: |
| | |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable :column="columnData" :height="'calc(100vh - 21em)'" :table-data="tableData" |
| | | <limsTable :column="columnData" :height="'calc(100vh - 22em)'" :table-data="tableData" |
| | | :table-loading="loading" style="margin-top: 18px; padding: 0 15px;" :page="page" |
| | | @pagination="pagination"></limsTable> |
| | | </template> |
| | |
| | | deletePersonPostAuthorizationRecord, |
| | | exportPersonPostAuthorizationRecord |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | import { nextTick } from "vue"; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | prop: 'id' |
| | | }, { |
| | | label: '证书编号', |
| | | prop: 'certificateNumber' |
| | | prop: 'certificateNumber', |
| | | width: '120px' |
| | | }, { |
| | | label: '被任职人员', |
| | | prop: 'userName' |
| | | prop: 'userName', |
| | | width: '120px' |
| | | }, { |
| | | label: '任职岗位', |
| | | prop: 'post' |
| | | prop: 'post', |
| | | width: '120px' |
| | | }, { |
| | | label: '理论考试成绩', |
| | | prop: 'num1' |
| | | prop: 'num1', |
| | | width: '160px' |
| | | }, { |
| | | label: '操作技能考试成绩', |
| | | prop: 'num2' |
| | | prop: 'num2', |
| | | width: '160px' |
| | | }, { |
| | | label: '操作时间', |
| | | prop: 'updateTime' |
| | | prop: 'updateTime', |
| | | width: '120px' |
| | | }, { |
| | | label: '备注', |
| | | prop: 'remarks', |
| | |
| | | label: '操作', |
| | | dataType: 'action', |
| | | width: 160, |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: '编辑', |
| | |
| | | tableData: [], |
| | | page: { |
| | | current: 1, |
| | | pageSize: 20, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | loading: false |
| | |
| | | */ |
| | | async getTableData() { |
| | | this.loading = true |
| | | await nextTick() |
| | | const params = this.isDepartment ? { |
| | | departLimsId: this.departId, |
| | | current: this.page.current, |
| | | size: this.page.pageSize |
| | | size: this.page.size |
| | | } : { |
| | | userId: this.departId, |
| | | current: this.page.current, |
| | | size: this.page.pageSize |
| | | size: this.page.size |
| | | } |
| | | const { code, data } = await PersonPostAuthorizationRecordPage(params) |
| | | if (code == 200) { |
| | |
| | | * @desc api删除 |
| | | */ |
| | | async delMandate(id) { |
| | | const formData = new FormData() |
| | | formData.append('id', id) |
| | | const { code, data } = await deletePersonPostAuthorizationRecord(formData) |
| | | const { code, data } = await deletePersonPostAuthorizationRecord({ id }) |
| | | if (code == 200) { |
| | | this.$message({ message: '删除成功', type: 'success' }) |
| | | this.getTableData() |
| | |
| | | }, { |
| | | label: '确认人', |
| | | prop: 'confirmOperatingPersonnelId', |
| | | minWidth: '100' |
| | | minWidth: '100', |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | let obj = this.responsibleOptions.find(m => m.id == params) |
| | | if (obj) { |
| | | return obj.name |
| | | } |
| | | }, |
| | | }, { |
| | | label: '确认日期', |
| | | prop: 'confirmDate', |
| | |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.getUserList(); |
| | | this.getList(this.departId); |
| | | }, |
| | | methods: { |
| | |
| | | this.form = { |
| | | jobResponsibilitiesTem: [] |
| | | } |
| | | this.getUserList(); |
| | | this.getResponsibilities(); |
| | | |
| | | }, |
| | |
| | | } else { |
| | | this.$set(this.form, 'jobResponsibilitiesTem', []) |
| | | } |
| | | this.getUserList(); |
| | | this.getResponsibilities(); |
| | | }, |
| | | submitForm() { |
| | |
| | | handleClaimFun(claimAndClaim, rowId) { |
| | | claimOfTrainingAndAssessmentRecords({ |
| | | claimAndClaim, |
| | | rowId |
| | | courseId: rowId |
| | | }).then((res) => { |
| | | this.getInDetailPlan(this.currentChangeRow.id); |
| | | }); |
| | |
| | | }, |
| | | yearTableData: [], // 年表 |
| | | yearPage: { |
| | | curent: 1, |
| | | pageSize: 20, |
| | | current: 1, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | yearColumnData: [ |
| | |
| | | }, |
| | | yearDetailTableData: [], // 年明细表 |
| | | yearDeatilPage: { |
| | | curent: 1, |
| | | pageSize: 20, |
| | | current: 1, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | yearDetailColumnData: [ |
| | |
| | | async getYearPlanList() { |
| | | this.yearLoading = true |
| | | const { code, data } = await yearPlanList({ |
| | | current: this.yearPage.curent, |
| | | size: this.yearPage.pageSize, |
| | | current: this.yearPage.current, |
| | | size: this.yearPage.size, |
| | | organizationPerson: this.yearForm.organizationPerson, |
| | | departId: this.departId |
| | | }) |
| | |
| | | this.yearDetailLoading = true |
| | | const { code, data } = await yearPlanDetailList({ |
| | | planId: this.planId, |
| | | current: this.yearDeatilPage.curent, |
| | | size: this.yearDeatilPage.pageSize, |
| | | current: this.yearDeatilPage.current, |
| | | size: this.yearDeatilPage.size, |
| | | date: this.yearDetailForm.date, |
| | | project: this.yearDetailForm.project |
| | | }) |
| | |
| | | if (step == 1) { |
| | | let result = this.mainForm.superviseForm |
| | | result.currentState = this.active + 1 |
| | | result.technicalDirectorDate = dateFormat(new Date(), 'YYYY-MM-DD HH:mm:ss') |
| | | result.technicalDirectorDate = dateFormat(new Date()) |
| | | return result |
| | | } |
| | | if (step == 2) { |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.isPermission = isPermission("isSubmit") |
| | | // this.isPermission = isPermission("isSubmit") |
| | | console.log('权限', this.isPermission); |
| | | }, |
| | | methods: { |
| | |
| | | */ |
| | | async getControlData(id) { |
| | | const { code, data } = await personSupervisionControlSheetPage({ id }) |
| | | if (code == 202) { |
| | | if (!data) { |
| | | this.controlType = '新增' |
| | | this.supervisionRecordId = id |
| | | this.active = 0 |
| | |
| | | this.controlId = undefined |
| | | this.initForm() |
| | | } |
| | | if (code == 200) { |
| | | if (data && code == 200) { |
| | | this.currentResponsible = data.currentResponsible |
| | | this.controlType = '编辑' |
| | | this.controlId = data.id |
| | |
| | | } else if (type == 'save') { |
| | | currentState = undefined |
| | | } |
| | | |
| | | if (this.active == 0) { |
| | | let { discoveryApproach, ...condiFormRest } = this.mainForm.condiForm |
| | | let approcahStr = discoveryApproach.join(',') |
| | |
| | | * @desc 提交表单 |
| | | */ |
| | | async submitForm(form) { |
| | | let user = JSON.parse(localStorage.getItem('user')); |
| | | |
| | | form.responsibleDepartmentId = Number(form.responsibleDepartmentId) |
| | | const { code } = await addOrUpdatePersonSupervisionControl({ |
| | | currentResponsible: user.name, |
| | | currentResponsible: this.$store.state.user.name, |
| | | ...form |
| | | }) |
| | | if (this.controlType == '新增') { |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.isPermission = isPermission("isSubmit") |
| | | // this.isPermission = isPermission("isSubmit") |
| | | console.log('权限', this.isPermission); |
| | | }, |
| | | methods: { |
| | |
| | | */ |
| | | async getProcessData(id) { |
| | | const { code, data } = await personSupervisionProcessingPage({ id }) |
| | | if (code == 202) { |
| | | if (!data) { |
| | | this.controlType = '新增' |
| | | this.supervisionRecordId = id |
| | | this.active = 0 |
| | | this.pageStatus = 0 |
| | | this.processId = undefined |
| | | } |
| | | if (code == 200) { |
| | | if (data && code == 200) { |
| | | this.currentResponsible = data.currentResponsible |
| | | this.controlType = '编辑' |
| | | this.supervisionRecordId = id |
| | |
| | | console.log('第1步', this.active, currentState) |
| | | let { factForm } = this.mainForm |
| | | this.submitForm({ |
| | | proposingDepartmentDate: dateFormat(new Date(), 'YYYY-MM-DD HH:mm:ss'), |
| | | proposingDepartmentDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | currentState: currentState, |
| | | ...factForm |
| | | }) |
| | |
| | | console.log('第2步', this.active, currentState) |
| | | let { reasonForm } = this.mainForm |
| | | this.submitForm({ |
| | | causeAnalysisDate: dateFormat(new Date(), 'YYYY-MM-DD HH:mm:ss'), |
| | | causeAnalysisDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | currentState: currentState, |
| | | ...reasonForm |
| | | }) |
| | |
| | | let { measureForm } = this.mainForm |
| | | let { requestDepartmentConfirmation, ...measureFormRest } = measureForm |
| | | this.submitForm({ |
| | | correctiveActionDate: dateFormat(new Date(), 'YYYY-MM-DD HH:mm:ss'), |
| | | correctiveActionDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | currentState: currentState, |
| | | requestDepartmentConfirmation: requestDepartmentConfirmation ? 1 : 2, |
| | | ...measureFormRest |
| | |
| | | console.log('第4步', this.active, currentState) |
| | | let { resultForm } = this.mainForm |
| | | this.submitForm({ |
| | | verificationDepartmentDate: dateFormat(new Date(), 'YYYY-MM-DD HH:mm:ss'), |
| | | verificationDepartmentDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | currentState: currentState, |
| | | ...resultForm |
| | | }) |
| | |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable :column="superviseColumnData" :handleSelectionChange="handleSelectionChange" |
| | | :height="'calc(100vh - 19em)'" :isSelection="true" :table-data="superviseTableData" |
| | | :height="'calc(100vh - 20em)'" :isSelection="true" :table-data="superviseTableData" |
| | | :table-loading="superviseLoading" rowKey="id" style="margin-top: 18px; padding: 0 15px;" |
| | | :page="page" @pagination="pagination"> |
| | | <div slot="action" slot-scope="scope"> |
| | |
| | | loading: false, |
| | | page: { |
| | | current: 1, |
| | | pageSize: 20, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | // 监督记录 |
| | |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.pageSize = limit; |
| | | this.page.size = limit; |
| | | this.getTableData(); |
| | | }, |
| | | // 获取监督记录 |
| | |
| | | departLimsId: this.isDepartment ? this.departId : null, |
| | | userId: this.isDepartment ? null : this.departId, |
| | | current: this.page.current, |
| | | size: this.page.pageSize |
| | | size: this.page.size |
| | | }) |
| | | if (code == 200) { |
| | | this.superviseTableData = data.records |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | .then(async () => { |
| | | console.log(this.multipleSelection) |
| | | let ids = this.multipleSelection.map((item) => item.id) |
| | | const code = this.delTableData(ids) |
| | | let ids = this.multipleSelection.map((item) => item.id).join(',') |
| | | const code = await this.delTableData(ids) |
| | | this.$message({ |
| | | type: code == 200 ? 'success' : 'error', |
| | | message: code == 200 ? '删除成功!' : '删除失败!' |
| | |
| | | }, |
| | | // 删除api |
| | | async delTableData(ids) { |
| | | const { code } = await this.$axios({ |
| | | method: 'delete', |
| | | url: deletePersonSupervisionRecord, |
| | | data: ids |
| | | }) |
| | | const { code } = await deletePersonSupervisionRecord({ ids }) |
| | | return code |
| | | }, |
| | | // 行背景色 |
| | |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable :column="trainingColumn" :currentChange="currentChange" :height="'calc(100vh - 18em)'" |
| | | <limsTable :column="trainingColumn" :currentChange="currentChange" :height="'calc(100vh - 20em)'" |
| | | :highlightCurrentRow="true" :table-data="trainingTableData" :table-loading="trainingLoading" |
| | | style="padding: 0 15px;" :page="trainingPagination" @pagination="trainingPaginationMethod"> |
| | | </limsTable> |
| | |
| | | import { |
| | | deleteRewardPunishment, |
| | | addOrUpdateRewardPunishment, |
| | | rewardPunishmentPage |
| | | rewardPunishmentPage, |
| | | selectUserList, |
| | | rewardPunishmentExport |
| | | } from '@/api/cnas/personnel/personnelInfo.js' |
| | | export default { |
| | | props: { |
| | |
| | | }, |
| | | handleDown() { |
| | | this.outLoading = true |
| | | this.$axios.post(this.$api.deviceCheck.rewardPunishmentExport, { |
| | | rewardPunishmentExport({ |
| | | userId: this.isDepartment ? '' : this.departId, |
| | | departmentId: this.isDepartment ? this.departId : '', |
| | | userName: this.search.userName, |
| | | startTime: this.search.searchTimeList && this.search.searchTimeList[0], |
| | | endTime: this.search.searchTimeList && this.search.searchTimeList[1] |
| | | }, { responseType: 'blob' }).then(res => { |
| | | }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { |
| | | type: 'application/force-download' |
| | | }) |
| | | //将Blob 对象转换成字符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | // 创建一个超链接,将文件流赋进去,然后实现这个超链接的单击事件 |
| | | const elink = document.createElement('a') |
| | | elink.download = decodeURI('奖惩记录' + '.xlsx') |
| | | elink.style.display = 'none' |
| | | elink.href = URL.createObjectURL(blob) |
| | | document.body.appendChild(elink) |
| | | elink.click(); |
| | | URL.revokeObjectURL(elink.href) // 释放URL 对象 |
| | | document.body.removeChild(elink) |
| | | this.$message.success('导出成功') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | // 创建一个超链接,将文件流赋进去,然后实现这个超链接的单击事件 |
| | | const elink = document.createElement('a') |
| | | elink.download = decodeURI('奖惩记录' + '.xlsx') |
| | | elink.style.display = 'none' |
| | | elink.href = URL.createObjectURL(blob) |
| | | document.body.appendChild(elink) |
| | | elink.click(); |
| | | URL.revokeObjectURL(elink.href) // 释放URL 对象 |
| | | document.body.removeChild(elink) |
| | | this.$message.success('导出成功') |
| | | } |
| | | } |
| | | this.$download.saveAs(blob, '奖惩记录' + '.xlsx') |
| | | }) |
| | | }, |
| | | // 获取负责人信息接口 |
| | | getUserList() { |
| | | this.$axios.get(this.$api.deviceScope.selectUserList).then(res => { |
| | | selectUserList().then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data |
| | | } |