From d3a5fbcc6516c77b32f54518a65e3238c3029d6d Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 14 三月 2025 19:31:35 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/center-lims-before-ruoyi into dev
---
src/components/Table/lims-table.vue | 278 +++++++++-------------------------
src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelCapacity/index.vue | 12 +
src/views/CNAS/personnel/personnelInfo/Department/components/JobResponsibilities/index.vue | 7
src/views/CNAS/personnel/personnelInfo/Department/components/Records/Add.vue | 2
src/views/CNAS/personnel/personnelInfo/Department/components/rewardPunishmentRecord/index.vue | 45 ----
src/views/CNAS/personnel/personnelInfo/Department/components/Records/control/index.vue | 11
src/views/CNAS/personnel/personnelInfo/Department/components/TrainingRecord/index.vue | 2
.env.development | 3
src/views/CNAS/personnel/personnelInfo/Department/components/Communicate/index.vue | 12
src/views/CNAS/personnel/personnelInfo/Department/components/Records/index.vue | 20 +-
src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelTraining/index.vue | 2
src/views/CNAS/personnel/personnelInfo/Department/components/Plan/index.vue | 16 +-
.env.production | 3
src/views/CNAS/personnel/personnelInfo/Department/components/Mandate/index.vue | 33 ++-
src/views/CNAS/personnel/personnelInfo/Department/components/Records/dispose/index.vue | 14
src/api/cnas/personnel/personnelInfo.js | 10 +
16 files changed, 164 insertions(+), 306 deletions(-)
diff --git a/.env.development b/.env.development
index 77fc3a8..747b42f 100644
--- a/.env.development
+++ b/.env.development
@@ -9,3 +9,6 @@
# 璺敱鎳掑姞杞�
VUE_CLI_BABEL_TRANSPILE_MODULES = true
+
+# 鏈湴鐜ip+绔彛
+VUE_BASE_URL = ''
\ No newline at end of file
diff --git a/.env.production b/.env.production
index 23d226f..a462f7f 100644
--- a/.env.production
+++ b/.env.production
@@ -6,3 +6,6 @@
# LIMS瀹為獙瀹ょ鐞嗙郴缁�/鐢熶骇鐜
VUE_APP_BASE_API = '/prod-api'
+
+# 鐢熶骇鐜ip+绔彛
+VUE_BASE_URL = ''
\ No newline at end of file
diff --git a/src/api/cnas/personnel/personnelInfo.js b/src/api/cnas/personnel/personnelInfo.js
index c9d6eaf..7698be2 100644
--- a/src/api/cnas/personnel/personnelInfo.js
+++ b/src/api/cnas/personnel/personnelInfo.js
@@ -737,6 +737,16 @@
});
}
+// 濂栨儵璁板綍 瀵煎嚭
+export function rewardPunishmentExport(query) {
+ return request({
+ url: "/personRewardPunishmentRecord/rewardPunishmentExport",
+ method: "get",
+ responseType: "blob",
+ params: query,
+ });
+}
+
/**
* @desc 宸ヤ綔灞ュ巻
*/
diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue
index bba1d5b..92642d0 100644
--- a/src/components/Table/lims-table.vue
+++ b/src/components/Table/lims-table.vue
@@ -1,85 +1,31 @@
<template>
<div>
<!-- 琛ㄦ牸 -->
- <el-table
- ref="multipleTable"
- v-loading="tableLoading"
- element-loading-text="鍔犺浇涓�..."
- element-loading-spinner="el-icon-loading"
- :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" element-loading-text="鍔犺浇涓�..."
+ element-loading-spinner="el-icon-loading" :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'">
@@ -87,141 +33,73 @@
</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="
- 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(
- scope.row[item.prop],
- item.formatData
- )"
- 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)"
- >{{
+ <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(
+ scope.row[item.prop],
+ item.formatData
+ )" 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)">{{
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
- ? 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
- >
+ <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>
</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
- ? 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
- >
+ <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>
</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>
@@ -236,16 +114,8 @@
</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>
@@ -334,19 +204,19 @@
handleSelectionChange: {
type: Function,
default: () => {
- return () => {};
+ return () => { };
},
},
rowClick: {
type: Function,
default: () => {
- return () => {};
+ return () => { };
},
},
currentChange: {
type: Function,
default: () => {
- return () => {};
+ return () => { };
},
},
border: {
@@ -375,7 +245,7 @@
},
rowClassName: {
type: Function,
- default: () => {},
+ default: () => { },
},
rowStyle: {
type: Function,
@@ -589,11 +459,11 @@
</script>
<style scoped>
-.el-table >>> .el-table__empty-text {
+.el-table>>>.el-table__empty-text {
text-align: center;
}
->>> .cell {
+>>>.cell {
padding: 0 !important;
}
@@ -610,7 +480,7 @@
cursor: pointer;
}
->>> .el-table__body-wrapper::-webkit-scrollbar {
+>>>.el-table__body-wrapper::-webkit-scrollbar {
height: 14px;
/* 璁剧疆婊氬姩鏉″搴� */
}
diff --git a/src/views/CNAS/personnel/personnelInfo/Department/components/Communicate/index.vue b/src/views/CNAS/personnel/personnelInfo/Department/components/Communicate/index.vue
index 086b96b..8e4f746 100644
--- a/src/views/CNAS/personnel/personnelInfo/Department/components/Communicate/index.vue
+++ b/src/views/CNAS/personnel/personnelInfo/Department/components/Communicate/index.vue
@@ -10,7 +10,7 @@
</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>
@@ -95,7 +95,7 @@
tableData: [],
page: {
current: 1,
- pageSize: 20,
+ size: 20,
total: 0
},
loading: false
@@ -113,11 +113,11 @@
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) {
@@ -147,9 +147,7 @@
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',
diff --git a/src/views/CNAS/personnel/personnelInfo/Department/components/JobResponsibilities/index.vue b/src/views/CNAS/personnel/personnelInfo/Department/components/JobResponsibilities/index.vue
index ef784f1..790a82a 100644
--- a/src/views/CNAS/personnel/personnelInfo/Department/components/JobResponsibilities/index.vue
+++ b/src/views/CNAS/personnel/personnelInfo/Department/components/JobResponsibilities/index.vue
@@ -206,20 +206,19 @@
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:
diff --git a/src/views/CNAS/personnel/personnelInfo/Department/components/Mandate/index.vue b/src/views/CNAS/personnel/personnelInfo/Department/components/Mandate/index.vue
index d6fa9a2..6456262 100644
--- a/src/views/CNAS/personnel/personnelInfo/Department/components/Mandate/index.vue
+++ b/src/views/CNAS/personnel/personnelInfo/Department/components/Mandate/index.vue
@@ -10,7 +10,7 @@
</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>
@@ -27,7 +27,6 @@
deletePersonPostAuthorizationRecord,
exportPersonPostAuthorizationRecord
} from '@/api/cnas/personnel/personnelInfo.js'
-import { nextTick } from "vue";
export default {
components: {
@@ -56,22 +55,28 @@
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',
@@ -80,6 +85,7 @@
label: '鎿嶄綔',
dataType: 'action',
width: 160,
+ fixed: 'right',
operation: [
{
name: '缂栬緫',
@@ -107,7 +113,7 @@
tableData: [],
page: {
current: 1,
- pageSize: 20,
+ size: 20,
total: 0
},
loading: false
@@ -126,15 +132,14 @@
*/
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) {
@@ -167,9 +172,7 @@
* @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()
diff --git a/src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelCapacity/index.vue b/src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelCapacity/index.vue
index 49dd10d..347cc33 100644
--- a/src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelCapacity/index.vue
+++ b/src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelCapacity/index.vue
@@ -294,7 +294,14 @@
}, {
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',
@@ -383,6 +390,7 @@
};
},
mounted() {
+ this.getUserList();
this.getList(this.departId);
},
methods: {
@@ -446,7 +454,6 @@
this.form = {
jobResponsibilitiesTem: []
}
- this.getUserList();
this.getResponsibilities();
},
@@ -461,7 +468,6 @@
} else {
this.$set(this.form, 'jobResponsibilitiesTem', [])
}
- this.getUserList();
this.getResponsibilities();
},
submitForm() {
diff --git a/src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelTraining/index.vue b/src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelTraining/index.vue
index add2c39..728e737 100644
--- a/src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelTraining/index.vue
+++ b/src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelTraining/index.vue
@@ -849,7 +849,7 @@
handleClaimFun(claimAndClaim, rowId) {
claimOfTrainingAndAssessmentRecords({
claimAndClaim,
- rowId
+ courseId: rowId
}).then((res) => {
this.getInDetailPlan(this.currentChangeRow.id);
});
diff --git a/src/views/CNAS/personnel/personnelInfo/Department/components/Plan/index.vue b/src/views/CNAS/personnel/personnelInfo/Department/components/Plan/index.vue
index cc43a63..5725459 100644
--- a/src/views/CNAS/personnel/personnelInfo/Department/components/Plan/index.vue
+++ b/src/views/CNAS/personnel/personnelInfo/Department/components/Plan/index.vue
@@ -100,8 +100,8 @@
},
yearTableData: [], // 骞磋〃
yearPage: {
- curent: 1,
- pageSize: 20,
+ current: 1,
+ size: 20,
total: 0
},
yearColumnData: [
@@ -199,8 +199,8 @@
},
yearDetailTableData: [], // 骞存槑缁嗚〃
yearDeatilPage: {
- curent: 1,
- pageSize: 20,
+ current: 1,
+ size: 20,
total: 0
},
yearDetailColumnData: [
@@ -298,8 +298,8 @@
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
})
@@ -357,8 +357,8 @@
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
})
diff --git a/src/views/CNAS/personnel/personnelInfo/Department/components/Records/Add.vue b/src/views/CNAS/personnel/personnelInfo/Department/components/Records/Add.vue
index 0919282..1a2f8f8 100644
--- a/src/views/CNAS/personnel/personnelInfo/Department/components/Records/Add.vue
+++ b/src/views/CNAS/personnel/personnelInfo/Department/components/Records/Add.vue
@@ -190,7 +190,7 @@
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) {
diff --git a/src/views/CNAS/personnel/personnelInfo/Department/components/Records/control/index.vue b/src/views/CNAS/personnel/personnelInfo/Department/components/Records/control/index.vue
index 325cf70..de58664 100644
--- a/src/views/CNAS/personnel/personnelInfo/Department/components/Records/control/index.vue
+++ b/src/views/CNAS/personnel/personnelInfo/Department/components/Records/control/index.vue
@@ -110,7 +110,7 @@
}
},
mounted() {
- this.isPermission = isPermission("isSubmit")
+ // this.isPermission = isPermission("isSubmit")
console.log('鏉冮檺', this.isPermission);
},
methods: {
@@ -160,7 +160,7 @@
*/
async getControlData(id) {
const { code, data } = await personSupervisionControlSheetPage({ id })
- if (code == 202) {
+ if (!data) {
this.controlType = '鏂板'
this.supervisionRecordId = id
this.active = 0
@@ -168,7 +168,7 @@
this.controlId = undefined
this.initForm()
}
- if (code == 200) {
+ if (data && code == 200) {
this.currentResponsible = data.currentResponsible
this.controlType = '缂栬緫'
this.controlId = data.id
@@ -207,6 +207,7 @@
} else if (type == 'save') {
currentState = undefined
}
+
if (this.active == 0) {
let { discoveryApproach, ...condiFormRest } = this.mainForm.condiForm
let approcahStr = discoveryApproach.join(',')
@@ -266,10 +267,10 @@
* @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 == '鏂板') {
diff --git a/src/views/CNAS/personnel/personnelInfo/Department/components/Records/dispose/index.vue b/src/views/CNAS/personnel/personnelInfo/Department/components/Records/dispose/index.vue
index 7dad14c..c806da4 100644
--- a/src/views/CNAS/personnel/personnelInfo/Department/components/Records/dispose/index.vue
+++ b/src/views/CNAS/personnel/personnelInfo/Department/components/Records/dispose/index.vue
@@ -94,7 +94,7 @@
}
},
mounted() {
- this.isPermission = isPermission("isSubmit")
+ // this.isPermission = isPermission("isSubmit")
console.log('鏉冮檺', this.isPermission);
},
methods: {
@@ -118,14 +118,14 @@
*/
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
@@ -162,7 +162,7 @@
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
})
@@ -171,7 +171,7 @@
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
})
@@ -181,7 +181,7 @@
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
@@ -191,7 +191,7 @@
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
})
diff --git a/src/views/CNAS/personnel/personnelInfo/Department/components/Records/index.vue b/src/views/CNAS/personnel/personnelInfo/Department/components/Records/index.vue
index 413d1a2..c34c01c 100644
--- a/src/views/CNAS/personnel/personnelInfo/Department/components/Records/index.vue
+++ b/src/views/CNAS/personnel/personnelInfo/Department/components/Records/index.vue
@@ -17,7 +17,7 @@
</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">
@@ -95,7 +95,7 @@
loading: false,
page: {
current: 1,
- pageSize: 20,
+ size: 20,
total: 0
},
// 鐩戠潱璁板綍
@@ -245,7 +245,7 @@
},
pagination({ page, limit }) {
this.page.current = page;
- this.page.pageSize = limit;
+ this.page.size = limit;
this.getTableData();
},
// 鑾峰彇鐩戠潱璁板綍
@@ -255,7 +255,7 @@
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
@@ -325,10 +325,10 @@
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 ? '鍒犻櫎鎴愬姛锛�' : '鍒犻櫎澶辫触锛�'
@@ -338,11 +338,7 @@
},
// 鍒犻櫎api
async delTableData(ids) {
- const { code } = await this.$axios({
- method: 'delete',
- url: deletePersonSupervisionRecord,
- data: ids
- })
+ const { code } = await deletePersonSupervisionRecord({ ids })
return code
},
// 琛岃儗鏅壊
diff --git a/src/views/CNAS/personnel/personnelInfo/Department/components/TrainingRecord/index.vue b/src/views/CNAS/personnel/personnelInfo/Department/components/TrainingRecord/index.vue
index 4f228e4..b7eb0bf 100644
--- a/src/views/CNAS/personnel/personnelInfo/Department/components/TrainingRecord/index.vue
+++ b/src/views/CNAS/personnel/personnelInfo/Department/components/TrainingRecord/index.vue
@@ -16,7 +16,7 @@
</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>
diff --git a/src/views/CNAS/personnel/personnelInfo/Department/components/rewardPunishmentRecord/index.vue b/src/views/CNAS/personnel/personnelInfo/Department/components/rewardPunishmentRecord/index.vue
index a9e1122..47c8291 100644
--- a/src/views/CNAS/personnel/personnelInfo/Department/components/rewardPunishmentRecord/index.vue
+++ b/src/views/CNAS/personnel/personnelInfo/Department/components/rewardPunishmentRecord/index.vue
@@ -108,7 +108,9 @@
import {
deleteRewardPunishment,
addOrUpdateRewardPunishment,
- rewardPunishmentPage
+ rewardPunishmentPage,
+ selectUserList,
+ rewardPunishmentExport
} from '@/api/cnas/personnel/personnelInfo.js'
export default {
props: {
@@ -212,56 +214,23 @@
},
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'
})
- //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆
- 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
}
--
Gitblit v1.9.3