From 0590bdfc0fa9f803d74207d9835b65191b20e576 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期六, 22 二月 2025 16:29:45 +0800
Subject: [PATCH] 完成记录的控制搬迁
---
src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue | 329 ++++---
src/views/system/user/index.vue | 211 ++--
src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue | 4
src/api/cnas/systemManagement/documentRecords.js | 299 +++++++
src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue | 396 +++++----
src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue | 315 ++++---
src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue | 332 ++++++--
src/components/Preview/filePreview.vue | 2
src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue | 438 +++++++---
9 files changed, 1,543 insertions(+), 783 deletions(-)
diff --git a/src/api/cnas/systemManagement/documentRecords.js b/src/api/cnas/systemManagement/documentRecords.js
index 30fc1d5..1b084f2 100644
--- a/src/api/cnas/systemManagement/documentRecords.js
+++ b/src/api/cnas/systemManagement/documentRecords.js
@@ -63,3 +63,302 @@
params: query,
});
}
+
+// 澶栨潵鏂囦欢纭璁板綍-鏂板
+export function addManageRecordVerify(data) {
+ return request({
+ url: "/manageRecordVerify/addManageRecordVerify",
+ method: "post",
+ data: data,
+ });
+}
+
+//澶栨潵鏂囦欢纭璁板綍-濉啓--鍒楄〃
+export function pageManageRecordVerify(query) {
+ return request({
+ url: "/manageRecordVerify/pageManageRecordVerify",
+ method: "get",
+ params: query,
+ });
+}
+
+// 澶栨潵鏂囦欢纭璁板綍-鍘嗗彶--鎻愪氦
+export function submitManageRecordTotal(data) {
+ return request({
+ url: "/manageRecordTotal/submitManageRecordTotal",
+ method: "post",
+ data: data,
+ });
+}
+
+// 澶栨潵鏂囦欢纭璁板綍-鍘嗗彶--瀹℃牳
+export function ratifyManageRecordTotal(data) {
+ return request({
+ url: "/manageRecordTotal/ratifyManageRecordTotal",
+ method: "post",
+ data: data,
+ });
+}
+
+//澶栨潵鏂囦欢纭璁板綍-濉啓--鍒犻櫎
+export function delManageRecordVerify(query) {
+ return request({
+ url: "/manageRecordVerify/delManageRecordVerify",
+ method: "delete",
+ params: query,
+ });
+}
+
+//澶栨潵鏂囦欢纭璁板綍-鍘嗗彶--鍒楄〃
+export function pageManageRecordTotal(query) {
+ return request({
+ url: "/manageRecordTotal/pageManageRecordTotal",
+ method: "get",
+ params: query,
+ });
+}
+
+// 澶栨潵鏂囦欢纭璁板綍-濉啓--淇敼
+export function doManageRecordVerify(data) {
+ return request({
+ url: "/manageRecordVerify/doManageRecordVerify",
+ method: "post",
+ data: data,
+ });
+}
+
+//鏂囦欢鍙戞斁鍥炴敹璁板綍-瀵煎嚭
+export function exportOutManageRecordIssueRecycle(query) {
+ return request({
+ url: "/manageRecordIssueRecycle/exportOutManageRecordIssueRecycle",
+ method: "get",
+ params: query,
+ });
+}
+
+// 鏂囦欢鍙戞斁鍥炴敹璁板綍-鏂板
+export function addManageRecordIssueRecycle(data) {
+ return request({
+ url: "/manageRecordIssueRecycle/addManageRecordIssueRecycle",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢鍙戞斁鍥炴敹璁板綍-缂栬緫
+export function doManageRecordIssueRecycle(data) {
+ return request({
+ url: "/manageRecordIssueRecycle/doManageRecordIssueRecycle",
+ method: "post",
+ data: data,
+ });
+}
+
+//鏌ヨCNAS浜哄憳渚ц竟鏍�
+export function selectCNSAPersonTree(query) {
+ return request({
+ url: "/personBasicInfo/selectCNSAPersonTree",
+ method: "get",
+ params: query,
+ });
+}
+
+//鏂囦欢鍙戞斁鍥炴敹璁板綍-鍒楄〃
+export function pageManageRecordIssueRecycle(query) {
+ return request({
+ url: "/manageRecordIssueRecycle/pageManageRecordIssueRecycle",
+ method: "get",
+ params: query,
+ });
+}
+
+//鏂囦欢鍙戞斁鍥炴敹璁板綍-鍒犻櫎
+export function delManageRecordIssueRecycle(query) {
+ return request({
+ url: "/manageRecordIssueRecycle/delManageRecordIssueRecycle",
+ method: "delete",
+ params: query,
+ });
+}
+
+//鏂囦欢淇-瀵煎嚭鍒楄〃
+export function exportOutManageRecordAudit(query) {
+ return request({
+ url: "/manageRecordAudit/exportOutManageRecordAudit",
+ method: "get",
+ params: query,
+ });
+}
+
+// 鏂囦欢淇-鏂板
+export function addManageRecordAudit(data) {
+ return request({
+ url: "/manageRecordAudit/addManageRecordAudit",
+ method: "post",
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
+ data: data,
+ });
+}
+
+// 鏂囦欢淇-缂栬緫
+export function doManageRecordAudit(data) {
+ return request({
+ url: "/manageRecordAudit/doManageRecordAudit",
+ method: "post",
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
+ data: data,
+ });
+}
+
+// 鏂囦欢淇-鎵瑰噯
+export function ratifyManageRecordAudit(data) {
+ return request({
+ url: "/manageRecordAudit/ratifyManageRecordAudit",
+ method: "post",
+ data: data,
+ });
+}
+
+//鏂囦欢淇-鍒楄〃
+export function pageManageRecordAudit(query) {
+ return request({
+ url: "/manageRecordAudit/pageManageRecordAudit",
+ method: "get",
+ params: query,
+ });
+}
+
+//鏂囦欢淇-鍒犻櫎
+export function delManageRecordAudit(query) {
+ return request({
+ url: "/manageRecordAudit/delManageRecordAudit",
+ method: "delete",
+ params: query,
+ });
+}
+
+//鏂囦欢瀹氭湡瀹℃煡璁板綍-瀵煎嚭
+export function exportOutManageRecordIntervals(query) {
+ return request({
+ url: "/manageRecordIntervals/exportOutManageRecordIntervals",
+ method: "get",
+ params: query,
+ });
+}
+
+// 鏂囦欢瀹氭湡瀹℃煡璁板綍-鏂板
+export function addManageRecordIntervals(data) {
+ return request({
+ url: "/manageRecordIntervals/addManageRecordIntervals",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢瀹氭湡瀹℃煡璁板綍-缂栬緫
+export function doManageRecordIntervals(data) {
+ return request({
+ url: "/manageRecordIntervals/doManageRecordIntervals",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢瀹氭湡瀹℃煡璁板綍-鍘嗗彶璁板綍-鎵瑰噯
+export function ratifyManageRecordIntervalsTotal(data) {
+ return request({
+ url: "/manageRecordIntervalsTotal/ratifyManageRecordIntervalsTotal",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢瀹氭湡瀹℃煡璁板綍-鍘嗗彶璁板綍-鎻愪氦
+export function submitManageRecordIntervalsTotal(data) {
+ return request({
+ url: "/manageRecordIntervalsTotal/submitManageRecordIntervalsTotal",
+ method: "post",
+ data: data,
+ });
+}
+
+//鏂囦欢瀹氭湡瀹℃煡璁板綍-鍒楄〃
+export function pageManageRecordIntervals(query) {
+ return request({
+ url: "/manageRecordIntervals/pageManageRecordIntervals",
+ method: "get",
+ params: query,
+ });
+}
+
+//鏂囦欢瀹氭湡瀹℃煡璁板綍-鍘嗗彶璁板綍-鍒楄〃
+export function pageManageRecordIntervalsTotal(query) {
+ return request({
+ url: "/manageRecordIntervalsTotal/pageManageRecordIntervalsTotal",
+ method: "get",
+ params: query,
+ });
+}
+
+//鏂囦欢瀹氭湡瀹℃煡璁板綍-鍒犻櫎
+export function delManageRecordIntervals(query) {
+ return request({
+ url: "/manageRecordIntervals/delManageRecordIntervals",
+ method: "delete",
+ params: query,
+ });
+}
+
+//鏂囦欢浣滃簾璁板綍-瀵煎嚭
+export function exportOutManageRecordCancel(query) {
+ return request({
+ url: "/manageRecordCancel/exportOutManageRecordCancel",
+ method: "get",
+ params: query,
+ });
+}
+
+// 鏂囦欢浣滃簾璁板綍-鏂板
+export function addManageRecordCancel(data) {
+ return request({
+ url: "/manageRecordCancel/addManageRecordCancel",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢浣滃簾璁板綍-缂栬緫
+export function doManageRecordCancel(data) {
+ return request({
+ url: "/manageRecordCancel/doManageRecordCancel",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂囦欢浣滃簾璁板綍-鎵瑰噯
+export function ratifyManageRecordCancel(data) {
+ return request({
+ url: "/manageRecordCancel/ratifyManageRecordCancel",
+ method: "post",
+ data: data,
+ });
+}
+
+//鏂囦欢浣滃簾璁板綍-鍒犻櫎
+export function delManageRecordCancel(query) {
+ return request({
+ url: "/manageRecordCancel/delManageRecordCancel",
+ method: "delete",
+ params: query,
+ });
+}
+
+//鏂囦欢浣滃簾璁板綍-鍒楄〃
+export function pageManageRecordCancel(query) {
+ return request({
+ url: "/manageRecordCancel/pageManageRecordCancel",
+ method: "get",
+ params: query,
+ });
+}
diff --git a/src/components/Preview/filePreview.vue b/src/components/Preview/filePreview.vue
index b449e48..1105afc 100644
--- a/src/components/Preview/filePreview.vue
+++ b/src/components/Preview/filePreview.vue
@@ -5,7 +5,7 @@
</div>
<div v-if="isPdf">
<object :data="fileUrl" type="application/pdf" width="100%" height="750px">
- <p>鎮ㄧ殑娴忚鍣ㄤ笉鏀寔 PDF 棰勮銆�<a :href="fileUrl">涓嬭浇 PDF 鏂囦欢</a></p>
+ <p>鎮ㄧ殑娴忚鍣ㄤ笉鏀寔 PDF 棰勮銆�<a :href="fileUrl" style="color: #3a7bfa;">涓嬭浇 PDF 鏂囦欢</a></p>
</object>
</div>
<div v-if="isDoc">
diff --git a/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue b/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue
index 08be833..1aba02d 100644
--- a/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue
+++ b/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue
@@ -27,7 +27,7 @@
:height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table>
</div>
<el-dialog :title="'娣诲姞' + radio + '璁板綍'" :visible.sync="addDialogVisible" top="10vh" width="800px">
- <el-row>
+ <el-row v-if="addDialogVisible">
<el-col :span="12" style="margin-bottom: 16px;">
<div class="search_thing">
<div class="search_label"><span style="color:red;margin-right: 4px;">*</span>鐢宠缂栧彿锛�</div>
@@ -152,7 +152,7 @@
<div class="search_thing">
<div class="search_label">涓婁紶闄勪欢锛�</div>
<div class="search_input"><el-upload :auto-upload="false" :multiple="false" :on-change="handleChangeUpload"
- accept='.pdf,.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx' action="#" style="margin: 8px 0 0px 50px;">
+ accept='.pdf,.doc,.docx,.xls,.xlsx' action="#" style="margin: 8px 0 0px 50px;">
<el-button size="small" type="primary">涓婁紶闄勪欢</el-button>
</el-upload></div>
</div>
diff --git a/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue b/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue
index 7eb6040..fb8d415 100644
--- a/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue
@@ -1,28 +1,16 @@
<template>
<!-- 浣滃簾鏂囦欢閿�姣佽褰� -->
<div class="ObsoleteDocumentDestructionRecords">
- <el-row class="title">
- <el-col :span="12" style="padding-left: 20px;text-align: left;">浣滃簾鏂囦欢閿�姣佽褰�</el-col>
- <el-col :span="12" style="text-align: right;">
- <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
- <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
- :on-change="beforeUpload" :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp"
- style="display:inline-block;margin-left: 20px;">
- <el-button type="primary" size="medium">瀵煎叆</el-button></el-upload>
- <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower"
- style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button>
- </el-col>
- </el-row>
<div class="search">
<div class="search_thing">
<div class="search_label">鏂囦欢鍚嶇О锛�</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="componentData.entity.documentName" @keyup.enter.native="refreshTable()"></el-input></div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentName"
+ @keyup.enter.native="refreshTable()"></el-input></div>
</div>
<div class="search_thing">
<div class="search_label">鏂囦欢缂栧彿锛�</div>
<div class="search_input">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="componentData.entity.documentCode"
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentCode"
@keyup.enter.native="refreshTable()"></el-input>
</div>
</div>
@@ -30,11 +18,19 @@
<el-button size="small" @click="refresh()">閲� 缃�</el-button>
<el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
</div>
+ <div class="btn">
+ <el-button size="small" type="primary" @click="openAdd">鏂板</el-button>
+ <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
+ :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp"
+ style="display:inline-block;margin-left: 20px;">
+ <el-button type="primary" size="small">瀵煎叆</el-button></el-upload>
+ <el-button size="small" type="primary" @click="handleDown" :loading="outLoading"
+ style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button>
+ </div>
</div>
<div class="table">
- <ValueTable ref="ValueTable" :url="$api.manageRecordCancel.pageManageRecordCancel"
- :delUrl="$api.manageRecordCancel.delManageRecordCancel" :componentData="componentData"
- :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex" />
+ <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
+ :height="'calc(100vh - 260px)'" @pagination="pagination"></lims-table>
</div>
<el-dialog :title="title" :visible.sync="addDialogVisible" width="400px" top="6vh">
<el-row>
@@ -89,11 +85,25 @@
</template>
<script>
-import ValueTable from '@/components/Table//value-table.vue'
+import limsTable from "@/components/Table/lims-table.vue";
import { getToken } from "@/utils/auth";
+import {
+ selectUserCondition,
+} from "@/api/business/inspectionTask.js";
+import {
+ exportOutManageRecordCancel,
+ addManageRecordCancel,
+ doManageRecordCancel,
+ ratifyManageRecordCancel,
+ delManageRecordCancel,
+ pageManageRecordCancel
+} from '@/api/cnas/systemManagement/documentRecords.js'
+import {
+ pageManageDocumentList,
+} from '@/api/cnas/systemManagement/documentControl.js'
export default {
components: {
- ValueTable
+ limsTable
},
data() {
return {
@@ -102,78 +112,71 @@
upPower: true,
outLoading: false,
addLoading: false,
- componentData: {
- entity: {
- documentName: null,
- documentCode: null,
- orderBy: {
- field: 'createTime',
- order: 'desc'
- }
- },
- isIndex: true,
- showSelect: false,
- select: false,
- // selectMethod: 'handleChangeTask',
- do: [{
- id: 'handleEdit0',
- font: '淇敼',
- type: 'text',
- method: 'handleEdit0',
- field: [],
- disabFun: (row, index) => {
- return row.ratifyState == '閫氳繃'
- }
- }, {
- id: 'handleRatify',
- font: '鎵瑰噯',
- type: 'text',
- method: 'handleRatify',
- field: [],
- disabFun: (row, index) => {
- return row.ratifyState == '閫氳繃'
- }
- }, {
- id: 'delete',
- font: '鍒犻櫎',
- type: 'text',
- method: 'doDiy',
- disabFun: (row, index) => {
- return row.ratifyState == '閫氳繃'
- }
- },],
- tagField: {
- // documentType:{
- // select: []
- // },
- // receiveUserName:{
- // select: []
- // },
- },
- selectField: {
- // documentType:{
- // select: []
- // },
- // receiveUserName:{
- // select: []
- // },
- },
- addUpload: ['signatoryUrl'],
- requiredAdd: [],
- requiredUp: [],
- datePicker: ['receiveDate'],
- noHead: ['signedUserName', 'signedDate', 'departLims'],//涓嶅弬涓庢柊澧炵紪杈戠殑瀛楁
- needSort: [],
- inputType: ''
- },
- entityCopy: {},
- upIndex: 0,
addInfo: {},
title: '鏂板',
addInfo: {},
addDialogVisible: false,
fileList: [],
personList: [],
+ queryParams: {},
+ tableData: [],
+ column: [
+ { label: "鏂囦欢缂栧彿", prop: "documentCode" },
+ { label: "鏂囦欢鍚嶇О", prop: "documentName", width: "120px" },
+ {
+ label: "鏁伴噺",
+ prop: "qty",
+ },
+ { label: "閿�姣佸師鍥�", prop: "reason" },
+ { label: "鐢宠浜�", prop: "createUserName" },
+ { label: "鐢宠鏃ユ湡", prop: "createTime" },
+ { label: "鎵瑰噯浜�", prop: "ratifyUserName" },
+ { label: "鎵瑰噯鏃ユ湡", prop: "ratifyTime" },
+ { label: "澶囨敞", prop: "remark" },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "缂栬緫",
+ type: "text",
+ clickFun: (row) => {
+ this.handleEdit0(row);
+ },
+ disabled: (row) => {
+ return row.ratifyState == '閫氳繃'
+ },
+ },
+ {
+ name: "鎵瑰噯",
+ type: "text",
+ clickFun: (row) => {
+ this.handleRatify(row);
+ },
+ disabled: (row) => {
+ return row.ratifyState == '閫氳繃'
+ },
+ },
+ {
+ name: "鍒犻櫎",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDelete(row);
+ },
+ disabled: (row) => {
+ return row.ratifyState == '閫氳繃'
+ },
+ },
+ ],
+ },
+ ],
+ page: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
+ tableLoading: false,
}
},
// 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
@@ -184,12 +187,12 @@
}
},
action() {
- return this.javaApi + this.$api.manageRecordCancel.exportInManageRecordCancel
+ return this.javaApi + '/manageRecordCancel/exportInManageRecordCancel'
}
},
mounted() {
- this.entityCopy = this.HaveJson(this.componentData.entity);
- this.getPower()
+ // this.entityCopy = this.HaveJson(this.componentData.entity);
+ this.getList()
this.getAuthorizedPerson()
this.getFileList()
},
@@ -232,7 +235,6 @@
this.upPower = up
},
openAdd() {
- // this.$refs.ValueTable.openAddDia(this.$api.manageRecordIssueRecycle.addManageRecordIssueRecycle);
this.addInfo = {}
this.title = '鏂板'
this.addDialogVisible = true;
@@ -245,24 +247,43 @@
// 瀵煎嚭
handleDown() {
this.outLoading = true
- this.$axios.post(this.$api.manageRecordCancel.exportOutManageRecordCancel, { entity: this.componentData.entity }, { headers: { 'Content-Type': 'application/json' } }).then(res => {
+ exportOutManageRecordCancel(this.queryParams).then(res => {
this.outLoading = false
if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触')
this.$message.success('瀵煎嚭鎴愬姛')
- let url = this.javaApi + 'word/' + res.message
- const link = document.createElement('a');
- link.href = url;
- link.download = '浣滃簾鏂囦欢閿�姣佽褰�';
- link.click();
+ let url = this.javaApi + '/word/' + res.data
+ this.$download.saveAs(url, "浣滃簾鏂囦欢閿�姣佽褰�");
})
},
- refreshTable() {
- this.refreshTable()()
+ getList() {
+ this.tableLoading = true;
+ let param = { ...this.queryParams, ...this.page };
+ delete param.total;
+ pageManageRecordCancel({ ...param })
+ .then((res) => {
+ this.tableLoading = false;
+ if (res.code === 200) {
+ this.tableData = res.data.records;
+ this.page.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading = false;
+ });
+ },
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.getList();
},
refresh() {
- this.componentData.entity = this.HaveJson(this.entityCopy)
- this.upIndex++
- this.refreshTable()
+ this.queryParams = {};
+ this.page.current = 1;
+ this.getList();
+ },
+ refreshTable() {
+ this.page.current = 1;
+ this.getList();
},
beforeUpload(file) {
if (file.size > 1024 * 1024 * 10) {
@@ -289,23 +310,11 @@
},
// 鑾峰彇鏂囦欢鍒楄〃--鏂囦欢娓呭崟
getFileList() {
- this.$axios.post(this.$api.manageDocumentList.pageManageDocumentList, {
- entity: {
- orderBy: {
- field: 'createTime',
- order: 'desc'
- }
- },
- page: {
- current: -1,
- size: -1
- }
- }, {
- headers: {
- 'Content-Type': 'application/json'
- }
+ pageManageDocumentList({
+ current: -1,
+ size: -1
}).then(res => {
- this.fileList = res.data.body.records.map(m => {
+ this.fileList = res.data.records.map(m => {
m.title = m.documentCode
return m
})
@@ -321,18 +330,33 @@
let { id, documentCode, documentName, qty, reason, remark } = this.addInfo
obj = { id, documentCode, documentName, qty, reason, remark }
}
- this.$axios.post(this.$api.manageRecordCancel[this.title == '鏂板' ? 'addManageRecordCancel' : 'doManageRecordCancel'], obj, { headers: { 'Content-Type': 'application/json' }, noQs: true }).then(res => {
- this.addLoading = false
- if (res.code == 201) {
- return
- }
- this.addDialogVisible = false
- this.$message({
- type: 'success',
- message: '鎿嶄綔鎴愬姛!'
- });
- this.refreshTable()
- }).catch(err => { })
+ if (this.title == '鏂板') {
+ addManageRecordCancel(obj).then(res => {
+ this.addLoading = false
+ if (res.code == 201) {
+ return
+ }
+ this.addDialogVisible = false
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!'
+ });
+ this.refreshTable()
+ }).catch(err => { })
+ } else {
+ doManageRecordCancel(obj).then(res => {
+ this.addLoading = false
+ if (res.code == 201) {
+ return
+ }
+ this.addDialogVisible = false
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!'
+ });
+ this.refreshTable()
+ }).catch(err => { })
+ }
},
getCurrentFile(e) {
let obj = this.fileList.find(m => m.documentCode == e)
@@ -341,7 +365,7 @@
}
},
getAuthorizedPerson() {
- this.$axios.get(this.$api.user.getUserMenu).then(res => {
+ selectUserCondition().then(res => {
let data = []
res.data.forEach(a => {
data.push({
@@ -349,8 +373,6 @@
value: a.id
})
})
- // this.componentData.tagField.receiveUserName.select = data
- // this.componentData.selectField.receiveUserName.select = data
this.personList = data
})
},
@@ -364,7 +386,7 @@
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
// 鐐瑰嚮鈥滅‘瀹氣�濇寜閽紝鍏佽鍏抽棴
- this.$axios.post(this.$api.manageRecordCancel.ratifyManageRecordCancel, { id: row.id, ratifyState: '閫氳繃' }).then(res => {
+ ratifyManageRecordCancel({ id: row.id, ratifyState: '閫氳繃' }).then(res => {
if (res.code === 201) return
this.refreshTable()
done();
@@ -378,7 +400,7 @@
})
} else if (action === 'cancel') {
// 鐐瑰嚮鈥滃彇娑堚�濇寜閽紝涓嶅厑璁稿叧闂�
- this.$axios.post(this.$api.manageRecordCancel.ratifyManageRecordCancel, { id: row.id, ratifyState: '涓嶉�氳繃' }).then(res => {
+ ratifyManageRecordCancel({ id: row.id, ratifyState: '涓嶉�氳繃' }).then(res => {
if (res.code === 201) return
this.refreshTable()
done();
@@ -398,7 +420,22 @@
}
}
})
- }
+ },
+ handleDelete(row) {
+ this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ delManageRecordCancel({ id: row.id }).then((res) => {
+ if (res.code == 201) return;
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.refresh();
+ });
+ })
+ .catch(() => { });
+ },
}
}
</script>
@@ -435,8 +472,14 @@
.table {
margin-top: 10px;
background-color: #fff;
- width: calc(100% - 40px);
height: calc(100% - 60px - 80px - 10px - 40px);
padding: 20px;
+ padding-top: 0;
+}
+
+.btn {
+ position: absolute;
+ right: 20px;
+ top: 16px;
}
</style>
diff --git a/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue b/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
index 9be00a1..874abfc 100644
--- a/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
@@ -1,28 +1,16 @@
<template>
<!-- 鎵�鏈夋枃浠讹紙鍐呫�佸閮ㄦ枃浠讹級鐨勫彂鏀句笌鍥炴敹璁板綍 -->
<div class="DistributionRetrievalRecordsAllDocuments">
- <el-row class="title">
- <el-col :span="12" style="padding-left: 20px;text-align: left;">鎵�鏈夋枃浠讹紙鍐呫�佸閮ㄦ枃浠讹級鐨勫彂鏀句笌鍥炴敹璁板綍</el-col>
- <el-col :span="12" style="text-align: right;">
- <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
- <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
- :on-change="beforeUpload" :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp"
- style="display:inline-block;margin-left: 20px;">
- <el-button type="primary" size="medium">瀵煎叆</el-button></el-upload>
- <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower"
- style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button>
- </el-col>
- </el-row>
<div class="search">
<div class="search_thing">
<div class="search_label">鏂囦欢鍚嶇О锛�</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="componentData.entity.documentName" @keyup.enter.native="refreshTable()"></el-input></div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentName"
+ @keyup.enter.native="refreshTable()"></el-input></div>
</div>
<div class="search_thing">
<div class="search_label">鏂囦欢缂栧彿锛�</div>
<div class="search_input">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="componentData.entity.documentCode"
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentCode"
@keyup.enter.native="refreshTable()"></el-input>
</div>
</div>
@@ -30,11 +18,19 @@
<el-button size="small" @click="refresh()">閲� 缃�</el-button>
<el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
</div>
+ <div class="btn">
+ <el-button size="small" type="primary" @click="openAdd">鏂板</el-button>
+ <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
+ :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp"
+ style="display:inline-block;margin-left: 20px;">
+ <el-button type="primary" size="small">瀵煎叆</el-button></el-upload>
+ <el-button size="small" type="primary" @click="handleDown" :loading="outLoading"
+ style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button>
+ </div>
</div>
<div class="table">
- <ValueTable ref="ValueTable" :url="$api.manageRecordIssueRecycle.pageManageRecordIssueRecycle"
- :delUrl="$api.manageRecordIssueRecycle.delManageRecordIssueRecycle" :componentData="componentData"
- :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex" />
+ <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
+ :height="'calc(100vh - 260px)'" @pagination="pagination"></lims-table>
</div>
<el-dialog :title="title" :visible.sync="addDialogVisible" width="400px" top="6vh">
<el-row>
@@ -133,14 +129,29 @@
</template>
<script>
-import ValueTable from '@/components/Table/value-table.vue'
+import limsTable from "@/components/Table/lims-table.vue";
import {
getYearAndMonthAndDays
} from '@/utils/date'
import { getToken } from "@/utils/auth";
+import {
+ selectUserCondition,
+} from "@/api/business/inspectionTask.js";
+import {
+ exportOutManageRecordIssueRecycle,
+ doManageRecordIssueRecycle,
+ addManageRecordIssueRecycle,
+ selectCNSAPersonTree,
+ pageManageRecordIssueRecycle,
+ delManageRecordIssueRecycle,
+} from '@/api/cnas/systemManagement/documentRecords.js'
+import {
+ pageManageDocumentList,
+} from '@/api/cnas/systemManagement/documentControl.js'
+import { mapGetters } from "vuex";
export default {
components: {
- ValueTable
+ limsTable
},
data() {
return {
@@ -149,78 +160,74 @@
upPower: true,
outLoading: false,
addLoading: false,
- componentData: {
- entity: {
- documentName: null,
- documentCode: null,
- orderBy: {
- field: 'id',
- order: 'desc'
- }
- },
- isIndex: true,
- showSelect: false,
- select: false,
- // selectMethod: 'handleChangeTask',
- do: [{
- id: 'delete',
- font: '鍒犻櫎',
- type: 'text',
- method: 'doDiy',
- disabFun: (row, index) => {
- return !!row.signedUser
- }
- }, {
- id: 'handleEdit',
- font: '淇敼',
- type: 'text',
- method: 'handleEdit',
- field: [],
- disabFun: (row, index) => {
- return !!row.signedUser
- }
- }, {
- id: 'handleBack',
- font: '鍥炴敹',
- type: 'text',
- method: 'handleBack',
- disabFun: (row, index) => {
- return !!row.signedUser
- }
- }],
- tagField: {
- // documentType:{
- // select: []
- // },
- // receiveUserName:{
- // select: []
- // },
- },
- selectField: {
- // documentType:{
- // select: []
- // },
- // receiveUserName:{
- // select: []
- // },
- },
- addUpload: ['signatoryUrl'],
- requiredAdd: [],
- requiredUp: [],
- datePicker: ['receiveDate'],
- noHead: ['signedUserName', 'signedDate', 'departLims'],//涓嶅弬涓庢柊澧炵紪杈戠殑瀛楁
- needSort: [],
- inputType: ''
- },
- entityCopy: {},
- upIndex: 0,
title: '鏂板',
addDialogVisible: false,
addInfo: {},
personList: [],
fileType: [],
fileList: [],
- list: []
+ list: [],
+ queryParams: {},
+ tableData: [],
+ column: [
+ { label: "鏂囦欢缂栧彿", prop: "documentCode" },
+ { label: "鏂囦欢鍚嶇О", prop: "documentName", width: "120px" },
+ {
+ label: "鐗堝彿",
+ prop: "documentVersion",
+ },
+ { label: "浠芥暟", prop: "pages" },
+ { label: "鏂囦欢绫诲埆", prop: "documentType" },
+ { label: "鍒嗗彂鍙�", prop: "number" },
+ { label: "鎺ュ彈浜�", prop: "receiveUserName" },
+ { label: "鎺ユ敹閮ㄩ棬", prop: "departLims" },
+ { label: "鎺ュ彈鏃ユ湡", prop: "receiveDate" },
+ { label: "绛炬敹浜�", prop: "signedUserName" },
+ { label: "绛炬敹鏃ユ湡", prop: "signedDate" },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "缂栬緫",
+ type: "text",
+ clickFun: (row) => {
+ this.handleEdit(row);
+ },
+ disabled: (row) => {
+ return !!row.signedUser
+ },
+ },
+ {
+ name: "鍥炴敹",
+ type: "text",
+ clickFun: (row) => {
+ this.handleBack(row);
+ },
+ disabled: (row) => {
+ return !!row.signedUser
+ },
+ },
+ {
+ name: "鍒犻櫎",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDelete(row);
+ },
+ disabled: (row) => {
+ return !!row.signedUser
+ },
+ },
+ ],
+ },
+ ],
+ page: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
+ tableLoading: false,
}
},
// 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
@@ -231,16 +238,18 @@
}
},
action() {
- return this.javaApi + this.$api.manageRecordIssueRecycle.exportInManageRecordIssueRecycle
- }
+ return this.javaApi + '/manageRecordIssueRecycle/exportInManageRecordIssueRecycle'
+ },
+ ...mapGetters(["userId"]),
},
mounted() {
- this.entityCopy = this.HaveJson(this.componentData.entity);
- this.getPower()
+ // this.entityCopy = this.HaveJson(this.componentData.entity);
+ this.getList()
this.getAuthorizedPerson()
this.selectEnumByCategory()
this.getFileList()
- this.selectTreeList()
+ // TODO 閮ㄩ棬鎺ュ彛闇�瑕侀噸鍐�
+ // this.selectTreeList()
},
methods: {
getPower() {
@@ -295,27 +304,46 @@
// 瀵煎嚭
handleDown() {
this.outLoading = true
- this.$axios.post(this.$api.manageRecordIssueRecycle.exportOutManageRecordIssueRecycle, { entity: this.componentData.entity }, { headers: { 'Content-Type': 'application/json' } }).then(res => {
+ exportOutManageRecordIssueRecycle(this.queryParams).then(res => {
this.outLoading = false
if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触')
this.$message.success('瀵煎嚭鎴愬姛')
- let url = this.javaApi + 'word/' + res.message
- const link = document.createElement('a');
- link.href = url;
- link.download = '鏂囦欢鍙戞斁涓庡洖鏀惰褰�';
- link.click();
+ let url = this.javaApi + '/word/' + res.data
+ this.$download.saveAs(url, '鏂囦欢鍙戞斁涓庡洖鏀惰褰�')
})
},
- refreshTable() {
- this.refreshTable()()
+ getList() {
+ this.tableLoading = true;
+ let param = { ...this.queryParams, ...this.page };
+ delete param.total;
+ pageManageRecordIssueRecycle({ ...param })
+ .then((res) => {
+ this.tableLoading = false;
+ if (res.code === 200) {
+ this.tableData = res.data.records;
+ this.page.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading = false;
+ });
+ },
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.getList();
},
refresh() {
- this.componentData.entity = this.HaveJson(this.entityCopy)
- this.upIndex++
- this.refreshTable()
+ this.queryParams = {};
+ this.page.current = 1;
+ this.getList();
+ },
+ refreshTable() {
+ this.page.current = 1;
+ this.getList();
},
getAuthorizedPerson() {
- this.$axios.get(this.$api.user.getUserMenu).then(res => {
+ selectUserCondition().then(res => {
let data = []
res.data.forEach(a => {
data.push({
@@ -323,8 +351,6 @@
value: a.id
})
})
- // this.componentData.tagField.receiveUserName.select = data
- // this.componentData.selectField.receiveUserName.select = data
this.personList = data
})
},
@@ -352,33 +378,18 @@
}
},
selectEnumByCategory() {
- this.$axios.post(this.$api.enums.selectEnumByCategory, {
- category: "鏂囦欢绫诲埆"
- }).then(res => {
- // this.componentData.tagField.documentType.select = res.data
- // this.componentData.selectField.documentType.select = res.data
- this.fileType = res.data
- })
+ // 鏂囦欢绫诲埆
+ this.getDicts("document_type").then((response) => {
+ this.fileType = this.dictToValue(response.data);
+ });
},
// 鑾峰彇鏂囦欢鍒楄〃--鏂囦欢娓呭崟
getFileList() {
- this.$axios.post(this.$api.manageDocumentList.pageManageDocumentList, {
- entity: {
- orderBy: {
- field: 'createTime',
- order: 'desc'
- }
- },
- page: {
- current: -1,
- size: -1
- }
- }, {
- headers: {
- 'Content-Type': 'application/json'
- }
+ pageManageDocumentList({
+ current: -1,
+ size: -1
}).then(res => {
- this.fileList = res.data.body.records.map(m => {
+ this.fileList = res.data.records.map(m => {
m.title = m.documentCode
return m
})
@@ -402,18 +413,33 @@
let { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims } = this.addInfo
obj = { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims }
}
- this.$axios.post(this.$api.manageRecordIssueRecycle[this.title == '鏂板' ? 'addManageRecordIssueRecycle' : 'doManageRecordIssueRecycle'], obj, { headers: { 'Content-Type': 'application/json' }, noQs: true }).then(res => {
- this.addLoading = false
- if (res.code == 201) {
- return
- }
- this.addDialogVisible = false
- this.$message({
- type: 'success',
- message: '鎿嶄綔鎴愬姛!'
- });
- this.refreshTable()
- }).catch(err => { })
+ if (this.title == '鏂板') {
+ addManageRecordIssueRecycle(obj).then(res => {
+ this.addLoading = false
+ if (res.code == 201) {
+ return
+ }
+ this.addDialogVisible = false
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!'
+ });
+ this.refreshTable()
+ }).catch(err => { })
+ } else {
+ doManageRecordIssueRecycle(obj).then(res => {
+ this.addLoading = false
+ if (res.code == 201) {
+ return
+ }
+ this.addDialogVisible = false
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!'
+ });
+ this.refreshTable()
+ }).catch(err => { })
+ }
},
// 鍥炴敹
handleBack(row) {
@@ -424,8 +450,8 @@
}).then(() => {
let obj = {}
let { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims } = row
- obj = { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims, signedDate: getYearAndMonthAndDays(), signedUser: JSON.parse(localStorage.getItem("user")).userId }
- this.$axios.post(this.$api.manageRecordIssueRecycle.doManageRecordIssueRecycle, obj, { headers: { 'Content-Type': 'application/json' }, noQs: true }).then(res => {
+ obj = { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims, signedDate: getYearAndMonthAndDays(), signedUser: this.userId }
+ doManageRecordIssueRecycle(obj).then(res => {
this.addLoading = false
if (res.code == 201) {
return
@@ -441,9 +467,24 @@
},
// 鏌ヨ鏍戝舰鍒楄〃
selectTreeList() {
- this.$axios.get(this.$api.personnel.selectCNSAPersonTree).then((res) => {
+ selectCNSAPersonTree().then((res) => {
this.list = res.data[0].children;
});
+ },
+ handleDelete(row) {
+ this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ delManageRecordIssueRecycle({ id: row.id }).then((res) => {
+ if (res.code == 201) return;
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.refresh();
+ });
+ })
+ .catch(() => { });
},
}
}
@@ -481,8 +522,8 @@
.table {
margin-top: 10px;
background-color: #fff;
- width: calc(100% - 40px);
height: calc(100% - 60px - 80px - 10px - 40px);
padding: 20px;
+ padding-top: 0;
}
</style>
diff --git a/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue b/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue
index 0bcdb64..afb2003 100644
--- a/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue
@@ -1,23 +1,21 @@
<template>
<!-- 澶栨潵鏂囦欢纭璁板綍 -->
<div class="ExternalDocumentConfirmationRecords">
- <el-row class="title">
- <el-col :span="20" style="padding-left: 20px;text-align: left;">澶栨潵鏂囦欢纭璁板綍</el-col>
- </el-row>
<el-tabs type="border-card" v-model="activeName" style="height: 100%;">
<el-tab-pane label="濉啓" name="濉啓" style="height: 100%;">
<div style="display: flex;align-items: center;justify-content: flex-end;margin-right: 20px;">
- <el-button size="small" type="primary" @click="handleAdd0" style="margin-left: 20px;"
- v-if="addPower">鏂板</el-button>
+ <el-button size="small" type="primary" @click="openAdd('鏂板')" style="margin-left: 20px;">鏂板</el-button>
<el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
- :on-change="beforeUpload" :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp"
+ :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp"
style="display:inline-block;margin-left: 20px;">
<el-button size="small" type="primary" :loading="upLoading">瀵煎叆</el-button></el-upload>
</div>
<div class="table" style="height: calc(100% - 200px)">
- <ValueTable ref="ValueTable0" :url="$api.manageRecordTotal.pageManageRecordVerify"
+ <!-- <ValueTable ref="ValueTable0" :url="$api.manageRecordTotal.pageManageRecordVerify"
:componentData="componentData0" :key="upIndex0" :delUrl="$api.manageRecordTotal.delManageRecordVerify"
- :upUrl="$api.manageRecordTotal.doManageRecordVerify" />
+ :upUrl="$api.manageRecordTotal.doManageRecordVerify" /> -->
+ <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading0"
+ :height="'calc(100vh - 270px)'" @pagination="pagination0"></lims-table>
</div>
</el-tab-pane>
<el-tab-pane label="鍘嗗彶璁板綍" name="鍘嗗彶璁板綍" style="height: 100%;">
@@ -25,8 +23,8 @@
<div class="search_thing">
<div class="search_label">骞达細</div>
<div class="search_input">
- <el-date-picker v-model="componentData.entity.year" type="year" placeholder="閫夋嫨骞�" format="yyyy"
- value-format="yyyy" size="small" @change="refreshTable()">
+ <el-date-picker v-model="queryParams.year" type="year" placeholder="閫夋嫨骞�" format="yyyy" value-format="yyyy"
+ size="small" @change="refreshTable()">
</el-date-picker>
</div>
</div>
@@ -36,8 +34,10 @@
</div>
</div>
<div class="table">
- <ValueTable ref="ValueTable" :url="$api.manageRecordTotal.pageManageRecordTotal"
- :componentData="componentData" :key="upIndex" />
+ <!-- <ValueTable ref="ValueTable" :url="$api.manageRecordTotal.pageManageRecordTotal"
+ :componentData="componentData" :key="upIndex" /> -->
+ <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
+ :height="'calc(100vh - 280px)'" @pagination="pagination"></lims-table>
</div>
</el-tab-pane>
</el-tabs>
@@ -51,17 +51,66 @@
<el-button type="primary" @click="submitCheck('閫氳繃')" :loading="checkLoading">閫� 杩�</el-button>
</span>
</el-dialog>
+ <!-- 鏂板/缂栬緫 -->
+ <el-dialog :title="title" :visible.sync="addDia" width="500px">
+ <el-form :model="addForm" ref="addForm" :rules="addRules" label-position="right" label-width="120px">
+ <el-form-item label="澶栨潵鏂囦欢鍚嶇О" prop="documentName">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addForm.documentName"></el-input>
+ </el-form-item>
+ <el-form-item label="鏂囦欢缂栧彿" prop="documentCode">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addForm.documentCode">
+ </el-input>
+ </el-form-item>
+ <el-form-item label="鏍囧噯瑙勮寖鍚嶇О" prop="standardName">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addForm.standardName">
+ </el-input>
+ </el-form-item>
+ <el-form-item label="鏍囧噯鍙�" prop="standardCode">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addForm.standardCode">
+ </el-input>
+ </el-form-item>
+ <el-form-item label="鐢熸晥鏃ユ湡" prop="effectiveDate">
+ <el-date-picker v-model="addForm.effectiveDate" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small"
+ style="width: 100%" type="date" value-format="yyyy-MM-dd">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item label="浣滃簾鏃ユ湡" prop="cancelDate">
+ <el-date-picker v-model="addForm.cancelDate" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small"
+ style="width: 100%" type="date" value-format="yyyy-MM-dd">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item label="澶囨敞" prop="note">
+ <el-input size="small" placeholder="璇疯緭鍏�" type="textarea" :rows="2" clearable v-model="addForm.note">
+ </el-input>
+ </el-form-item>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="addDia = false">鍙� 娑�</el-button>
+ <el-button :loading="uploading" type="primary" @click="submitProduct('addForm')">纭� 璁�</el-button>
+ </span>
+ </el-dialog>
</div>
</template>
<script>
+import limsTable from "@/components/Table/lims-table.vue";
import filePreview from '@/components/Preview/filePreview.vue'
import ValueTable from '@/components/Table/value-table.vue'
import { getToken } from "@/utils/auth";
+import {
+ addManageRecordVerify,
+ pageManageRecordVerify,
+ submitManageRecordTotal,
+ ratifyManageRecordTotal,
+ delManageRecordVerify,
+ pageManageRecordTotal,
+ doManageRecordVerify
+} from '@/api/cnas/systemManagement/documentRecords.js'
export default {
components: {
ValueTable,
filePreview,
+ limsTable,
},
data() {
return {
@@ -70,96 +119,127 @@
lookDialogVisible: false,
noCheckLoading: false,
checkLoading: false,
- componentData: {
- entity: {
- year: null,
- orderBy: {
- field: 'id',
- order: 'desc'
- }
- },
- isIndex: true,
- showSelect: false,
- select: false,
- do: [{
- id: 'handleLook',
- font: '鏌ョ湅',
- type: 'text',
- method: 'handleLook',
- disabFun: (row, index) => {
- return !row.url
- }
- }, {
- id: 'handleDown0',
- font: '涓嬭浇',
- type: 'text',
- method: 'handleDown0',
- disabFun: (row, index) => {
- return !row.url
- }
- },
- {
- id: 'handleSubmit',
- font: '鎻愪氦',
- type: 'text',
- method: 'handleSubmit',
- disabFun: (row, index) => {
- return !!row.submitUserName
- }
- }, {
- id: 'handleApproval',
- font: '鎵瑰噯',
- type: 'text',
- method: 'handleApproval',
- disabFun: (row, index) => {
- return !row.submitUserName || !!row.ratifyUserName
- }
- }],
- tagField: {},
- selectField: {},
- requiredAdd: [],
- requiredUp: [],
- needSort: [],
- inputType: ''
- },
- // 鏍峰搧鍒楄〃
- componentData0: {
- entity: {
- manageRecordTotalId: null,
- orderBy: {
- field: 'id',
- order: 'desc'
- }
- },
- isIndex: true,
- showSelect: false,
- select: false,
- do: [{
- id: 'update',
- font: '淇敼',
- type: 'text',
- method: 'doDiy'
- }, {
- id: 'delete',
- font: '鍒犻櫎',
- type: 'text',
- method: 'doDiy'
- }],
- tagField: {},
- selectField: {},
- requiredAdd: ['documentName', 'documentCode'],
- requiredUp: ['documentName', 'documentCode'],
- datePicker: ['effectiveDate', 'cancelDate'],
- needSort: [],
- inputType: ''
- },
- upIndex0: 100,
- entityCopy: {},
- upIndex: 0,
addPower: true,
upPower: true,
currentInfo: {},
upLoading: false,
+ queryParams: {},
+ tableData: [],
+ column: [
+ { label: "骞翠唤", prop: "year" },
+ { label: "鎬绘暟閲�", prop: "totalNum", width: "120px" },
+ {
+ label: "鎷熷埗浜�",
+ prop: "submitUserName",
+ },
+ { label: "鎷熷埗鏃ユ湡", prop: "submitDate" },
+ { label: "鎵瑰噯浜�", prop: "ratifyUserName" },
+ { label: "鎵瑰噯鏃ユ湡", prop: "ratifyDate" },
+ { label: "鎵瑰噯缁撴灉", prop: "ratifyState" },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "鏌ョ湅",
+ type: "text",
+ clickFun: (row) => {
+ this.handleLook(row);
+ },
+ disabled: (row) => {
+ return !row.url
+ },
+ },
+ {
+ name: "涓嬭浇",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDown0(row);
+ },
+ disabled: (row) => {
+ return !row.url
+ },
+ },
+ {
+ name: "鎻愪氦",
+ type: "text",
+ clickFun: (row) => {
+ this.handleSubmit(row);
+ },
+ disabled: (row) => {
+ return !!row.submitUserName
+ },
+ },
+ {
+ name: "鎵瑰噯",
+ type: "text",
+ clickFun: (handleApproval) => {
+ this.handleSubmit(row);
+ },
+ disabled: (row) => {
+ return !row.submitUserName || !!row.ratifyUserName
+ },
+ },
+ ],
+ },
+ ],
+ page: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
+ tableLoading: false,
+ tableData0: [],
+ column0: [
+ { label: "澶栨潵鏂囦欢鍚嶇О", prop: "documentName" },
+ { label: "鏂囦欢缂栧彿", prop: "documentCode", width: "120px" },
+ {
+ label: "鏍囧噯瑙勮寖鍚嶇О",
+ prop: "standardName",
+ },
+ { label: "鏍囧噯鍙�", prop: "standardCode" },
+ { label: "鐢熸晥鏃ユ湡", prop: "effectiveDate" },
+ { label: "浣滃簾鏃ユ湡", prop: "cancelDate" },
+ { label: "澶囨敞", prop: "note" },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "缂栬緫",
+ type: "text",
+ clickFun: (row) => {
+ this.openAdd("缂栬緫", row);
+ },
+ },
+ {
+ name: "鍒犻櫎",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDelete(row);
+ },
+ },
+ ],
+ },
+ ],
+ page0: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
+ tableLoading0: false,
+ title: '鏂板',
+ addForm: {},
+ addDia: false,
+ addRules: {
+ documentName: [{ required: true, message: "璇疯緭鍏ュ鏉ユ枃浠跺悕绉�", trigger: "blur" }],
+ documentCode: [
+ { required: true, message: "璇疯緭鍏ユ枃浠剁紪鍙�", trigger: "blur" },
+ ],
+ },
+ uploading: false,
}
},
// 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
@@ -170,12 +250,13 @@
}
},
action() {
- return this.javaApi + this.$api.manageRecordTotal.exportManageRecordVerify
+ return this.javaApi + '/manageRecordVerify/exportManageRecordVerify'
}
},
mounted() {
- this.entityCopy = this.HaveJson(this.componentData.entity);
- this.getPower()
+ // this.entityCopy = this.HaveJson(this.componentData.entity);
+ this.getList()
+ this.getList0()
},
methods: {
getPower() {
@@ -217,11 +298,65 @@
this.addPower = add
this.upPower = up
},
- handleAdd0() {
- this.$refs.ValueTable0.openAddDia(this.$api.manageRecordTotal.addManageRecordVerify);
+ openAdd(title, row) {
+ this.title = title;
+ if (row) {
+ this.addForm = row;
+ } else {
+ this.addForm = {};
+ }
+ this.addDia = true;
+ },
+ getList() {
+ this.tableLoading = true;
+ let param = { ...this.queryParams, ...this.page };
+ delete param.total;
+ pageManageRecordTotal({ ...param })
+ .then((res) => {
+ this.tableLoading = false;
+ if (res.code === 200) {
+ this.tableData = res.data.records;
+ this.page.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading = false;
+ });
+ },
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.getList();
+ },
+ getList0() {
+ this.tableLoading0 = true;
+ let param = { ...this.page0 };
+ delete param.total;
+ pageManageRecordVerify({ ...param })
+ .then((res) => {
+ this.tableLoading0 = false;
+ if (res.code === 200) {
+ this.tableData0 = res.data.records;
+ this.page0.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading0 = false;
+ });
+ },
+ pagination0({ page, limit }) {
+ this.pag0.current = page;
+ this.page0.size = limit;
+ this.getList0();
+ },
+ refresh() {
+ this.queryParams = {};
+ this.page.current = 1;
+ this.getList();
},
refreshTable() {
- this.refreshTable()()
+ this.page.current = 1;
+ this.getList();
},
beforeUpload(file) {
if (file.size > 1024 * 1024 * 10) {
@@ -241,15 +376,10 @@
this.upLoading = false;
if (response.code == 200) {
this.$message.success('涓婁紶鎴愬姛');
- this.$refs['ValueTable0'].selectList()
+ this.getList0();
} else {
this.$message.error('涓婁紶澶辫触');
}
- },
- refresh() {
- this.componentData.entity = this.HaveJson(this.entityCopy)
- this.upIndex++
- this.refreshTable()
},
submitCheck(type) { },
// 鏌ョ湅
@@ -260,19 +390,12 @@
// 鍏敤鏂规硶
commonFun(row, callbanck) {
this.currentInfo = row
- this.componentData0.entity.manageRecordTotalId = row.id
- this.$axios.post(this.$api.manageRecordTotal.pageManageRecordVerify, {
- entity: this.componentData0.entity,
- page: {
- current: -1,
- size: -1
- }
- }, {
- headers: {
- 'Content-Type': 'application/json'
- }, noQs: true
+ pageManageRecordVerify({
+ current: -1,
+ size: -1,
+ manageRecordTotalId: row.id
}).then(res => {
- this.currentInfo.arr = res.data.body.records
+ this.currentInfo.arr = res.data.records
this.lookDialogVisible = true
if (callbanck) {
callbanck()
@@ -280,11 +403,8 @@
}).catch(err => { });
},
handleDown0(row) {
- let url = this.javaApi + 'word/' + row.url
- const link = document.createElement('a');
- link.href = url;
- link.download = row.month + ' 澶栨潵鏂囦欢纭璁板綍';
- link.click();
+ let url = this.javaApi + '/word/' + row.url
+ this.$download.saveAs(url, '澶栨潵鏂囦欢纭璁板綍')
},
// 鎻愪氦
handleSubmit(row) {
@@ -293,7 +413,7 @@
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- this.$axios.post(this.$api.manageRecordTotal.submitManageRecordTotal, {
+ submitManageRecordTotal({
id: row.id
}).then(res => {
this.$message({
@@ -316,7 +436,7 @@
} else {
this.noCheckLoading = true
}
- this.$axios.post(this.$api.manageRecordTotal.ratifyManageRecordTotal, {
+ ratifyManageRecordTotal({
id: this.currentInfo.id,
ratifyState: state
}).then(res => {
@@ -330,6 +450,59 @@
this.refreshTable()()
this.lookDialogVisible = false
}).catch(err => { });
+ },
+ handleDelete(row) {
+ this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ delManageRecordVerify({ id: row.id }).then((res) => {
+ if (res.code == 201) return;
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.getList0()
+ });
+ })
+ .catch(() => { });
+ },
+ submitProduct(formName) {
+ this.$refs[formName].validate((valid) => {
+ if (valid) {
+ this.uploading = true;
+ if (this.title == "鏂板") {
+ addManageRecordVerify(this.addForm)
+ .then((res) => {
+ this.uploading = false;
+ if (res.code != 200) {
+ return;
+ }
+ this.$message.success("鎻愪氦鎴愬姛");
+ this.getList0()
+ this.addDia = false;
+ })
+ .catch((err) => {
+ this.uploading = false;
+ });
+ } else {
+ doManageRecordVerify(this.addForm)
+ .then((res) => {
+ this.uploading = false;
+ if (res.code != 200) {
+ return;
+ }
+ this.$message.success("鎻愪氦鎴愬姛");
+ this.getList0()
+ this.addDia = false;
+ })
+ .catch((err) => {
+ this.uploading = false;
+ });
+ }
+ } else {
+ return false;
+ }
+ });
},
}
}
@@ -356,7 +529,7 @@
}
.search_label {
- width: 110px;
+ width: 30px;
font-size: 14px;
text-align: right;
}
@@ -367,9 +540,8 @@
.table {
background-color: #fff;
- width: calc(100% - 40px);
- height: calc(100% - 60px - 140px);
- padding: 20px;
+ height: 100%;
+ margin-top: 10px;
}
>>>.el-tabs__content {
diff --git a/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue b/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
index 5e9b191..f0ec6cd 100644
--- a/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
@@ -1,29 +1,18 @@
<template>
<!-- 鏂囦欢瀹氭湡瀹℃煡璁板綍 -->
<div class="PeriodicDocumentReviewRecords">
- <el-row class="title">
- <el-col :span="12" style="padding-left: 20px;text-align: left;">鏂囦欢瀹氭湡瀹℃煡璁板綍</el-col>
- <!-- <el-col :span="12" style="text-align: right;">
- <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
- <el-upload :action="action" :show-file-list="false"
- accept='.doc,.docx' :headers="headers" :on-change="beforeUpload"
- :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
- <el-button type="primary" size="medium">瀵煎叆</el-button></el-upload>
- <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower" style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button>
- </el-col> -->
- </el-row>
<el-tabs type="border-card" v-model="activeName" style="height: 100%;">
<el-tab-pane label="濉啓" name="濉啓" style="height: 100%;">
<div class="search">
<div class="search_thing">
<div class="search_label">鏂囦欢鍚嶇О锛�</div>
<div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="componentData.entity.documentName" @keyup.enter.native="refreshTable()"></el-input></div>
+ v-model="queryParams.documentName" @keyup.enter.native="refreshTable()"></el-input></div>
</div>
<div class="search_thing">
<div class="search_label">鏂囦欢缂栧彿锛�</div>
<div class="search_input">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="componentData.entity.documentCode"
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentCode"
@keyup.enter.native="refreshTable()"></el-input>
</div>
</div>
@@ -32,17 +21,19 @@
<el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
</div>
<div class="btns">
- <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
+ <el-button size="small" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
<el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
:on-change="beforeUpload" :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp"
style="display:inline-block;margin-left: 20px;">
- <el-button type="primary" size="medium">瀵煎叆</el-button></el-upload>
+ <el-button type="primary" size="small">瀵煎叆</el-button></el-upload>
</div>
</div>
<div class="table">
- <ValueTable ref="ValueTable" :url="$api.manageRecordIntervals.pageManageRecordIntervals"
+ <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
+ :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table>
+ <!-- <ValueTable ref="ValueTable" :url="$api.manageRecordIntervals.pageManageRecordIntervals"
:delUrl="$api.manageRecordIntervals.delManageRecordIntervals" :componentData="componentData"
- :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex" />
+ :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex" /> -->
</div>
</el-tab-pane>
<el-tab-pane label="鍘嗗彶璁板綍" name="鍘嗗彶璁板綍" style="height: 100%;">
@@ -50,8 +41,8 @@
<div class="search_thing">
<div class="search_label">骞达細</div>
<div class="search_input">
- <el-date-picker v-model="componentData0.entity.year" type="year" placeholder="閫夋嫨骞�" format="yyyy"
- value-format="yyyy" size="small" @change="refreshTable()">
+ <el-date-picker v-model="queryParams0.year" type="year" placeholder="閫夋嫨骞�" format="yyyy"
+ value-format="yyyy" size="small" @change="refreshTable(1)">
</el-date-picker>
</div>
</div>
@@ -61,8 +52,10 @@
</div>
</div>
<div class="table">
- <ValueTable ref="ValueTable0" :url="$api.manageRecordIntervals.pageManageRecordIntervalsTotal"
- :componentData="componentData0" :key="upIndex" />
+ <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading"
+ :height="'calc(100vh - 290px)'" @pagination="pagination0"></lims-table>
+ <!-- <ValueTable ref="ValueTable0" :url="$api.manageRecordIntervals.pageManageRecordIntervalsTotal"
+ :componentData="componentData0" :key="upIndex" /> -->
</div>
</el-tab-pane>
</el-tabs>
@@ -139,12 +132,25 @@
</template>
<script>
-import ValueTable from '@/components/Table/value-table.vue'
+import limsTable from "@/components/Table/lims-table.vue";
import filePreview from '@/components/Preview/filePreview.vue'
import { getToken } from "@/utils/auth";
+import {
+ exportOutManageRecordIntervals,
+ addManageRecordIntervals,
+ doManageRecordIntervals,
+ ratifyManageRecordIntervalsTotal,
+ submitManageRecordIntervalsTotal,
+ pageManageRecordIntervals,
+ pageManageRecordIntervalsTotal,
+ delManageRecordIntervals,
+} from '@/api/cnas/systemManagement/documentRecords.js'
+import {
+ pageManageDocumentList,
+} from '@/api/cnas/systemManagement/documentControl.js'
export default {
components: {
- ValueTable,
+ limsTable,
filePreview
},
data() {
@@ -270,6 +276,112 @@
fileList: [],
typeList: [],
currentInfo: {},
+ queryParams: {},
+ tableData: [],
+ column: [
+ { label: "鏂囦欢鍚嶇О", prop: "documentName" },
+ { label: "鏂囦欢缂栧彿", prop: "documentCode", width: "120px" },
+ {
+ label: "鐗堟湰鍙�",
+ prop: "documentVersion",
+ },
+ { label: "淇鍙�", prop: "revision" },
+ { label: "閫傚疁鎬�", prop: "suitability" },
+ { label: "澶囨敞", prop: "remark" },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "缂栬緫",
+ type: "text",
+ clickFun: (row) => {
+ this.handleEdit(row);
+ },
+ },
+ {
+ name: "鍒犻櫎",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDelete(row);
+ },
+ },
+ ],
+ },
+ ],
+ page: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
+ tableLoading: false,
+ queryParams0: {},
+ tableData0: [],
+ column0: [
+ { label: "骞翠唤", prop: "year" },
+ { label: "鎬绘暟閲�", prop: "totalNum", width: "120px" },
+ {
+ label: "鎷熷埗浜�",
+ prop: "submitUserName",
+ },
+ { label: "鎷熷埗鏃ユ湡", prop: "submitDate" },
+ { label: "鎵瑰噯浜�", prop: "ratifyUserName" },
+ { label: "鎵瑰噯鏃ユ湡", prop: "ratifyDate" },
+ { label: "鎵瑰噯缁撴灉", prop: "ratifyState" },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "鏌ョ湅",
+ type: "text",
+ clickFun: (row) => {
+ this.handleLook(row);
+ },
+ disabled: (row) => {
+ return !row.url
+ },
+ },
+ {
+ name: "涓嬭浇",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDown0(row);
+ },
+ disabled: (row) => {
+ return !row.url
+ },
+ },
+ {
+ name: "鎻愪氦",
+ type: "text",
+ clickFun: (row) => {
+ this.handleSubmit(row);
+ },
+ disabled: (row) => {
+ return !!row.submitUserName && row.ratifyState != '涓嶉�氳繃'
+ },
+ },
+ {
+ name: "鎵瑰噯",
+ type: "text",
+ clickFun: (row) => {
+ this.handleApproval(row);
+ },
+ disabled: (row) => {
+ return (!row.submitUserName || !!row.ratifyUserName) && row.ratifyState != '涓嶉�氳繃'
+ },
+ },
+ ],
+ },
+ ],
+ page0: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
}
},
// 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
@@ -280,13 +392,14 @@
}
},
action() {
- return this.javaApi + this.$api.manageRecordIntervals.exportInManageRecordIntervals
+ return this.javaApi + '/manageRecordIntervals/exportInManageRecordIntervals'
}
},
mounted() {
- this.entityCopy = this.HaveJson(this.componentData.entity);
- this.entityCopy0 = this.HaveJson(this.componentData0.entity);
- this.getPower()
+ // this.entityCopy = this.HaveJson(this.componentData.entity);
+ // this.entityCopy0 = this.HaveJson(this.componentData0.entity);
+ this.getList()
+ this.getList0()
this.getFileList()
this.selectEnumByCategory()
},
@@ -345,31 +458,74 @@
// 瀵煎嚭
handleDown() {
this.outLoading = true
- this.$axios.post(this.$api.manageRecordIntervals.exportOutManageRecordIntervals, { entity: this.componentData.entity }, { headers: { 'Content-Type': 'application/json' } }).then(res => {
+ exportOutManageRecordIntervals(this.queryParams).then(res => {
this.outLoading = false
if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触')
this.$message.success('瀵煎嚭鎴愬姛')
let url = this.javaApi + 'word/' + res.message
- const link = document.createElement('a');
- link.href = url;
- link.download = '鏂囦欢瀹氭湡瀹℃煡璁板綍';
- link.click();
+ this.$download.saveAs(url, "鏂囦欢瀹氭湡瀹℃煡璁板綍");
})
+ },
+ getList() {
+ this.tableLoading = true;
+ let param = { ...this.queryParams, ...this.page };
+ delete param.total;
+ pageManageRecordIntervals({ ...param })
+ .then((res) => {
+ this.tableLoading = false;
+ if (res.code === 200) {
+ this.tableData = res.data.records;
+ this.page.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading = false;
+ });
+ },
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.getList();
+ },
+ getList0() {
+ this.tableLoading = true;
+ let param = { ...this.queryParams0, ...this.page0 };
+ delete param.total;
+ pageManageRecordIntervalsTotal({ ...param })
+ .then((res) => {
+ this.tableLoading = false;
+ if (res.code === 200) {
+ this.tableData0 = res.data.records;
+ this.page0.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading = false;
+ });
+ },
+ pagination0({ page, limit }) {
+ this.page0.current = page;
+ this.page0.size = limit;
+ this.getList0();
},
refreshTable(num) {
if (num) {
- this.$refs['ValueTable0'].selectList()
+ this.page0.current = 1;
+ this.getList0();
} else {
- this.refreshTable()()
+ this.page.current = 1;
+ this.getList();
}
},
refresh(num) {
if (num) {
- this.componentData0.entity = this.HaveJson(this.entityCopy0)
- this.upIndex++
+ this.queryParams0 = {};
+ this.page0.current = 1;
+ this.getList0();
} else {
- this.componentData.entity = this.HaveJson(this.entityCopy)
- this.upIndex++
+ this.queryParams = {};
+ this.page.current = 1;
+ this.getList();
}
},
beforeUpload(file) {
@@ -406,34 +562,21 @@
},
// 鑾峰彇鏂囦欢鍒楄〃--鏂囦欢娓呭崟
getFileList() {
- this.$axios.post(this.$api.manageDocumentList.pageManageDocumentList, {
- entity: {
- orderBy: {
- field: 'id',
- order: 'asc'
- }
- },
- page: {
- current: -1,
- size: -1
- }
- }, {
- headers: {
- 'Content-Type': 'application/json'
- }
+ pageManageDocumentList({
+ current: -1,
+ size: -1
}).then(res => {
- this.fileList = res.data.body.records.map(m => {
+ this.fileList = res.data.records.map(m => {
m.title = m.documentCode
return m
})
}).catch(err => { })
},
selectEnumByCategory() {
- this.$axios.post(this.$api.enums.selectEnumByCategory, {
- category: "閫傚疁鎬�"
- }).then(res => {
- this.typeList = res.data
- })
+ // 鏂囦欢绫诲埆
+ this.getDicts("suitability").then((response) => {
+ this.typeList = this.dictToValue(response.data);
+ });
},
// 鎻愪氦
handleAdd() {
@@ -446,18 +589,33 @@
let { id, documentCode, documentName, documentVersion, revision, suitability, remark } = this.addInfo
obj = { id, documentCode, documentName, documentVersion, revision, suitability, remark }
}
- this.$axios.post(this.$api.manageRecordIntervals[this.title == '鏂板' ? 'addManageRecordIntervals' : 'doManageRecordIntervals'], obj, { headers: { 'Content-Type': 'application/json' }, noQs: true }).then(res => {
- this.addLoading = false
- if (res.code == 201) {
- return
- }
- this.addDialogVisible = false
- this.$message({
- type: 'success',
- message: '鎿嶄綔鎴愬姛!'
- });
- this.refreshTable()
- }).catch(err => { })
+ if (this.title == '鏂板') {
+ addManageRecordIntervals(obj).then(res => {
+ this.addLoading = false
+ if (res.code == 201) {
+ return
+ }
+ this.addDialogVisible = false
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!'
+ });
+ this.refreshTable()
+ }).catch(err => { })
+ } else {
+ doManageRecordIntervals(obj).then(res => {
+ this.addLoading = false
+ if (res.code == 201) {
+ return
+ }
+ this.addDialogVisible = false
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!'
+ });
+ this.refreshTable()
+ }).catch(err => { })
+ }
},
// 淇敼
handleEdit(row) {
@@ -471,7 +629,7 @@
} else {
this.noCheckLoading = true
}
- this.$axios.post(this.$api.manageRecordIntervals.ratifyManageRecordIntervalsTotal, {
+ ratifyManageRecordIntervalsTotal({
id: this.currentInfo.id,
ratifyState: state
}).then(res => {
@@ -484,7 +642,7 @@
type: 'success',
message: '鎿嶄綔鎴愬姛!'
});
- this.$refs['ValueTable0'].selectList()
+ this.refreshTable(1);
this.lookDialogVisible = false
}).catch(err => { });
},
@@ -501,11 +659,8 @@
}
},
handleDown0(row) {
- let url = this.javaApi + 'word/' + row.url
- const link = document.createElement('a');
- link.href = url;
- link.download = row.month + ' 鎵�鏈夋枃浠跺畾鏈熸鏌ヨ褰�';
- link.click();
+ let url = this.javaApi + '/word/' + row.url
+ this.$download.saveAs(url, "鎵�鏈夋枃浠跺畾鏈熸鏌ヨ褰�");
},
// 鎻愪氦
handleSubmit(row) {
@@ -514,7 +669,7 @@
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- this.$axios.post(this.$api.manageRecordIntervals.submitManageRecordIntervalsTotal, {
+ submitManageRecordIntervalsTotal({
id: row.id
}).then(res => {
if (res.code === 201) return
@@ -522,7 +677,7 @@
type: 'success',
message: '鎻愪氦鎴愬姛!'
});
- this.$refs['ValueTable0'].selectList()
+ this.refreshTable(1);
}).catch(err => { });
})
},
@@ -530,6 +685,21 @@
handleApproval(row) {
this.title0 = '鎵瑰噯'
this.commonFun(row)
+ },
+ handleDelete(row) {
+ this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ delManageRecordIntervals({ id: row.id }).then((res) => {
+ if (res.code == 201) return;
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.refreshTable();
+ });
+ })
+ .catch(() => { });
},
}
}
@@ -568,9 +738,9 @@
.table {
margin-top: 10px;
background-color: #fff;
- width: calc(100% - 40px);
height: calc(100% - 60px - 140px);
padding: 20px;
+ padding-top: 0;
}
>>>.el-tabs__content {
diff --git a/src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue b/src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue
index c7d80ce..c281b47 100644
--- a/src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue
@@ -1,28 +1,11 @@
<template>
<!-- 鏂囦欢淇鐢宠瀹℃壒璁板綍 -->
<div class="DocumentRevisionRequestApprovalRecords">
- <el-row class="title">
- <el-col :span="12" style="padding-left: 20px;text-align: left;">鏂囦欢淇鐢宠瀹℃壒璁板綍</el-col>
- <el-col :span="12" style="text-align: right;">
- <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
- <!-- <el-upload :action="action" :show-file-list="false"
- accept='.doc,.docx' :headers="headers" :on-change="beforeUpload"
- :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
- <el-button type="primary" size="medium">瀵煎叆</el-button></el-upload> -->
- <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower"
- style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button>
- </el-col>
- </el-row>
<div class="search">
- <!-- <div class="search_thing">
- <div class="search_label">鏂囦欢鍚嶇О锛�</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="componentData.entity.documentName"
- @keyup.enter.native="refreshTable()"></el-input></div>
- </div> -->
<div class="search_thing">
<div class="search_label">鏂囦欢缂栧彿锛�</div>
<div class="search_input">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="componentData.entity.documentCode"
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentCode"
@keyup.enter.native="refreshTable()"></el-input>
</div>
</div>
@@ -30,11 +13,15 @@
<el-button size="small" @click="refresh()">閲� 缃�</el-button>
<el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
</div>
+ <div class="btn">
+ <el-button size="small" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
+ <el-button size="small" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower"
+ style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button>
+ </div>
</div>
<div class="table">
- <ValueTable ref="ValueTable" :url="$api.manageRecordAudit.pageManageRecordAudit"
- :delUrl="$api.manageRecordAudit.delManageRecordAudit" :componentData="componentData"
- :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex" />
+ <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
+ :height="'calc(100vh - 260px)'" @pagination="pagination"></lims-table>
</div>
<el-dialog :title="title" :visible.sync="addDialogVisible" width="800px" top="6vh">
<el-row>
@@ -335,13 +322,28 @@
</template>
<script>
-import ValueTable from '@/components/Table/value-table.vue'
+import limsTable from "@/components/Table/lims-table.vue";
import { exportHtmlToPDF } from '@/utils/downHtmlToPDF'
import filePreview from '@/components/Preview/filePreview.vue'
+import {
+ exportOutManageRecordAudit,
+ addManageRecordAudit,
+ doManageRecordAudit,
+ selectCNSAPersonTree,
+ ratifyManageRecordAudit,
+ pageManageRecordAudit,
+ delManageRecordAudit,
+} from '@/api/cnas/systemManagement/documentRecords.js'
+import {
+ pageManageDocumentList,
+} from '@/api/cnas/systemManagement/documentControl.js'
+import {
+ selectUserCondition,
+} from "@/api/business/inspectionTask.js";
export default {
components: {
- ValueTable,
- filePreview
+ filePreview,
+ limsTable
},
data() {
return {
@@ -350,114 +352,6 @@
outLoading: false,
lookDialogVisible: false,
addLoading: false,
- componentData: {
- entity: {
- // documentName: null,
- documentCode: null,
- orderBy: {
- field: 'createTime',
- order: 'desc'
- }
- },
- isIndex: true,
- showSelect: false,
- select: false,
- // selectMethod: 'handleChangeTask',
- do: [{
- id: 'handleLook',
- font: '鏌ョ湅',
- type: 'text',
- method: 'handleLook'
- }, {
- id: 'handleLook0',
- font: '鏂囦欢棰勮',
- type: 'text',
- method: 'handleLook0'
- }, {
- id: 'handleOut',
- font: '涓嬭浇',
- type: 'text',
- method: 'handleOut'
- }, {
- id: 'delete',
- font: '鍒犻櫎',
- type: 'text',
- method: 'doDiy',
- disabFun: (row, index) => {
- return !!row.ratifyUser
- }
- }, {
- id: 'handleEdit',
- font: '淇敼',
- type: 'text',
- method: 'handleEdit',
- field: [],
- disabFun: (row, index) => {
- return !!row.ratifyUser
- }
- }, {
- id: 'handleRatify',
- font: '鎵瑰噯',
- type: 'text',
- method: 'handleRatify',
- field: [],
- disabFun: (row, index) => {
- return !!row.ratifyUser
- }
- }, {
- id: 'handlework0',
- font: '鐢宠鎰忚',
- type: 'text',
- method: 'handlework0',
- field: [],
- disabFun: (row, index) => {
- return !!row.ratifyUser
- }
- }, {
- id: 'handlework1',
- font: '鍘熷畾鍒舵剰瑙�',
- type: 'text',
- method: 'handlework1',
- field: [],
- disabFun: (row, index) => {
- return !!row.ratifyUser
- }
- }, {
- id: 'handlework2',
- font: '鍘熷鏍告剰瑙�',
- type: 'text',
- method: 'handlework2',
- field: [],
- disabFun: (row, index) => {
- return !!row.ratifyUser
- }
- }],
- tagField: {
- // documentType:{
- // select: []
- // },
- // receiveUserName:{
- // select: []
- // },
- },
- selectField: {
- // documentType:{
- // select: []
- // },
- // receiveUserName:{
- // select: []
- // },
- },
- addUpload: ['signatoryUrl'],
- requiredAdd: [],
- requiredUp: [],
- datePicker: ['receiveDate'],
- noHead: ['signedUserName', 'signedDate', 'departLims'],//涓嶅弬涓庢柊澧炵紪杈戠殑瀛楁
- needSort: [],
- inputType: ''
- },
- entityCopy: {},
- upIndex: 0,
title: '鏂板',
addInfo: {
method: '淇',
@@ -470,11 +364,121 @@
file: null,
title0: '鏌ョ湅',
currentInfo: {},
+ queryParams: {},
+ tableData: [],
+ column: [
+ { label: "鏂囦欢缂栧彿", prop: "documentCode" },
+ { label: "绔犺妭鍙�", prop: "capter", width: "120px" },
+ {
+ label: "椤电爜",
+ prop: "pages",
+ },
+ { label: "淇娆℃暟", prop: "number" },
+ { label: "淇敼鍓嶇増鏈彿", prop: "beforeVersion" },
+ { label: "淇敼鍚庣増鏈彿", prop: "afterVersion" },
+ { label: "淇敼鍐呭", prop: "alterThing" },
+ { label: "淇浜�", prop: "alterUserName" },
+ { label: "鎵瑰噯浜�", prop: "ratifyUserName" },
+ { label: "鏃ユ湡", prop: "date" },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "鏌ョ湅",
+ type: "text",
+ clickFun: (row) => {
+ this.handleLook(row);
+ },
+ },
+ {
+ name: "鏂囦欢棰勮",
+ type: "text",
+ clickFun: (row) => {
+ this.handleLook0(row);
+ },
+ },
+ {
+ name: "涓嬭浇",
+ type: "text",
+ clickFun: (row) => {
+ this.handleOut(row);
+ },
+ },
+ {
+ name: "鍒犻櫎",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDelete(row);
+ },
+ disabled: (row) => {
+ return !!row.ratifyUser
+ },
+ },
+ {
+ name: "缂栬緫",
+ type: "text",
+ clickFun: (row) => {
+ this.handleEdit(row);
+ },
+ disabled: (row) => {
+ return !!row.ratifyUser
+ },
+ },
+ {
+ name: "鎵瑰噯",
+ type: "text",
+ clickFun: (row) => {
+ this.handleRatify(row);
+ },
+ disabled: (row) => {
+ return !!row.ratifyUser
+ },
+ },
+ {
+ name: "鐢宠鎰忚",
+ type: "text",
+ clickFun: (row) => {
+ this.handlework0(row);
+ },
+ disabled: (row) => {
+ return !!row.ratifyUser
+ },
+ },
+ {
+ name: "鍘熷畾鍒舵剰瑙�",
+ type: "text",
+ clickFun: (row) => {
+ this.handlework1(row);
+ },
+ disabled: (row) => {
+ return !!row.ratifyUser
+ },
+ },
+ {
+ name: "鍘熷鏍告剰瑙�",
+ type: "text",
+ clickFun: (row) => {
+ this.handlework2(row);
+ },
+ disabled: (row) => {
+ return !!row.ratifyUser
+ },
+ },
+ ],
+ },
+ ],
+ page: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
+ tableLoading: false,
}
},
mounted() {
- this.entityCopy = this.HaveJson(this.componentData.entity);
- this.getPower()
+ this.getList()
this.getFileList()
this.getAuthorizedPerson()
this.selectTreeList()
@@ -543,44 +547,51 @@
// 瀵煎嚭
handleDown() {
this.outLoading = true
- this.$axios.post(this.$api.manageRecordAudit.exportOutManageRecordAudit, { entity: this.componentData.entity }, { headers: { 'Content-Type': 'application/json' } }).then(res => {
+ exportOutManageRecordAudit(this.queryParams).then(res => {
this.outLoading = false
if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触')
this.$message.success('瀵煎嚭鎴愬姛')
- let url = this.javaApi + 'word/' + res.message
- const link = document.createElement('a');
- link.href = url;
- link.download = '鏂囦欢淇琛�';
- link.click();
+ let url = this.javaApi + '/word/' + res.data
+ this.$download.saveAs(url, "鏂囦欢淇琛�");
})
},
- refreshTable() {
- this.refreshTable()()
+ getList() {
+ this.tableLoading = true;
+ let param = { ...this.queryParams, ...this.page };
+ delete param.total;
+ pageManageRecordAudit({ ...param })
+ .then((res) => {
+ this.tableLoading = false;
+ if (res.code === 200) {
+ this.tableData = res.data.records;
+ this.page.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading = false;
+ });
+ },
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.getList();
},
refresh() {
- this.componentData.entity = this.HaveJson(this.entityCopy)
- this.upIndex++
- this.refreshTable()
+ this.queryParams = {};
+ this.page.current = 1;
+ this.getList();
+ },
+ refreshTable() {
+ this.page.current = 1;
+ this.getList();
},
// 鑾峰彇鏂囦欢鍒楄〃--鏂囦欢娓呭崟
getFileList() {
- this.$axios.post(this.$api.manageDocumentList.pageManageDocumentList, {
- entity: {
- orderBy: {
- field: 'createTime',
- order: 'desc'
- }
- },
- page: {
- current: -1,
- size: -1
- }
- }, {
- headers: {
- 'Content-Type': 'application/json'
- }
+ pageManageDocumentList({
+ current: -1,
+ size: -1
}).then(res => {
- this.fileList = res.data.body.records.map(m => {
+ this.fileList = res.data.records.map(m => {
m.title = m.documentCode
return m
})
@@ -600,12 +611,7 @@
fd.append(m, this.addInfo[m])
}
this.addLoading = true
- this.$axios.post(this.$api.manageRecordAudit.addManageRecordAudit, fd, {
- headers: {
- 'Content-Type': 'multipart/form-data'
- },
- noQs: true
- }).then(res => {
+ addManageRecordAudit(fd).then(res => {
this.addLoading = false
if (res.code == 200) {
this.$message({
@@ -636,12 +642,7 @@
}
}
this.addLoading = true
- this.$axios.post(this.$api.manageRecordAudit.doManageRecordAudit, fd, {
- headers: {
- 'Content-Type': 'multipart/form-data'
- },
- noQs: true
- }).then(res => {
+ doManageRecordAudit(fd).then(res => {
this.addLoading = false
if (res.code == 200) {
this.refreshTable()
@@ -656,7 +657,7 @@
}
},
getAuthorizedPerson() {
- this.$axios.get(this.$api.user.getUserMenu).then(res => {
+ selectUserCondition().then(res => {
let data = []
res.data.forEach(a => {
data.push({
@@ -664,14 +665,12 @@
value: a.id
})
})
- // this.componentData.tagField.receiveUserName.select = data
- // this.componentData.selectField.receiveUserName.select = data
this.personList = data
})
},
// 鏌ヨ鏍戝舰鍒楄〃
selectTreeList() {
- this.$axios.get(this.$api.personnel.selectCNSAPersonTree).then((res) => {
+ selectCNSAPersonTree().then((res) => {
this.list = res.data[0].children;
});
},
@@ -692,15 +691,13 @@
type: 'warning'
})
.then(() => {
- this.$axios
- .post(this.$api.manageRecordAudit.ratifyManageRecordAudit, { id: row.id })
- .then(res => {
- if (res.code === 201) {
- return;
- }
- this.$message.success('鎿嶄綔鎴愬姛');
- this.refreshTable();
- })
+ ratifyManageRecordAudit({ id: row.id }).then(res => {
+ if (res.code === 201) {
+ return;
+ }
+ this.$message.success('鎿嶄綔鎴愬姛');
+ this.refreshTable();
+ })
.catch(e => {
this.$message.error('鎿嶄綔澶辫触');
});
@@ -744,7 +741,22 @@
handleLook0(row) {
this.currentInfo = row;
this.lookDialogVisible = true
- }
+ },
+ handleDelete(row) {
+ this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ delManageRecordAudit({ id: row.id }).then((res) => {
+ if (res.code == 201) return;
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.refresh();
+ });
+ })
+ .catch(() => { });
+ },
}
}
</script>
@@ -760,6 +772,7 @@
height: 80px;
display: flex;
align-items: center;
+ position: relative;
}
.search_thing {
@@ -781,15 +794,16 @@
.table {
margin-top: 10px;
background-color: #fff;
- width: calc(100% - 40px);
height: calc(100% - 60px - 80px - 10px - 40px);
padding: 20px;
+ padding-top: 0;
}
.tables {
table-layout: fixed;
width: 100%;
margin-top: 10px;
+ border-collapse: collapse;
}
.tables td {
@@ -845,4 +859,10 @@
>>>.el-dialog__body {
height: auto;
}
+
+.btn {
+ position: absolute;
+ right: 20px;
+ top: 16px;
+}
</style>
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index dcfc2e9..2b823cb 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -6,11 +6,15 @@
<pane size="12">
<el-col>
<div class="head-container addButton">
- <el-input v-model="deptName" placeholder="閮ㄩ棬鍚嶇О" clearable size="small" prefix-icon="el-icon-search" style="margin-bottom: 20px" />
- <el-button style="margin-left: 4px" type="primary" plain icon="el-icon-plus" size="mini" circle @click="addSchema"></el-button>
+ <el-input v-model="deptName" placeholder="閮ㄩ棬鍚嶇О" clearable size="small" prefix-icon="el-icon-search"
+ style="margin-bottom: 20px" />
+ <el-button style="margin-left: 4px" type="primary" plain icon="el-icon-plus" size="mini" circle
+ @click="addSchema"></el-button>
</div>
<div class="head-container">
- <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false" :filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current @node-click="handleNodeClick" />
+ <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false"
+ :filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current
+ @node-click="handleNodeClick" />
</div>
</el-col>
</pane>
@@ -20,11 +24,13 @@
<div>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item label="鐢ㄦ埛鍚嶇О" prop="nickName">
- <el-input v-model="queryParams.nickName" placeholder="璇疯緭鍏ョ敤鎴峰悕绉�" clearable @keyup.enter.native="handleQuery" />
+ <el-input v-model="queryParams.nickName" placeholder="璇疯緭鍏ョ敤鎴峰悕绉�" clearable
+ @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="鐘舵��" prop="status">
<el-select v-model="queryParams.status" placeholder="鐢ㄦ埛鐘舵��" clearable>
- <el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label" :value="dict.value" />
+ <el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label"
+ :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item>
@@ -34,8 +40,10 @@
</el-form>
</div>
<div class="options_button">
- <el-button type="primary" size="mini" @click="openthirdParty" v-hasPermi="['system:user:add']">鑾峰彇涓夋柟浜哄憳</el-button>
- <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:user:add']">鏂板鐢ㄦ埛</el-button>
+ <el-button type="primary" size="mini" @click="openthirdParty"
+ v-hasPermi="['system:user:add']">鑾峰彇涓夋柟浜哄憳</el-button>
+ <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
+ v-hasPermi="['system:user:add']">鏂板鐢ㄦ埛</el-button>
</div>
</div>
<el-col>
@@ -45,25 +53,28 @@
<el-table-column label="璐﹀彿" align="center" key="userName" prop="userName" :show-overflow-tooltip="true" />
<el-table-column label="鐘舵��" align="center" key="status">
<template slot-scope="scope">
- <el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
+ <el-switch v-model="scope.row.status" active-value="0" inactive-value="1"
+ @change="handleStatusChange(scope.row)"></el-switch>
</template>
</el-table-column>
<el-table-column label="鎵嬫満鍙风爜" align="center" key="phonenumber" prop="phonenumber" width="120" />
<el-table-column label="鎿嶄綔" align="center" width="160" class-nickName="small-padding fixed-width">
<template slot-scope="scope">
- <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:user:edit']">淇敼</el-button>
-<!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']">鍒犻櫎</el-button>-->
-<!-- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:user:resetPwd', 'system:user:edit']">-->
-<!-- <el-button size="mini" type="text" icon="el-icon-d-arrow-right">鏇村</el-button>-->
-<!-- <el-dropdown-menu slot="dropdown">-->
-<!-- <el-dropdown-item command="handleResetPwd" icon="el-icon-key" v-hasPermi="['system:user:resetPwd']">閲嶇疆瀵嗙爜</el-dropdown-item>-->
-<!-- <el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check" v-hasPermi="['system:user:edit']">鍒嗛厤瑙掕壊</el-dropdown-item>-->
-<!-- </el-dropdown-menu>-->
-<!-- </el-dropdown>-->
+ <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
+ v-hasPermi="['system:user:edit']">淇敼</el-button>
+ <!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']">鍒犻櫎</el-button>-->
+ <!-- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:user:resetPwd', 'system:user:edit']">-->
+ <!-- <el-button size="mini" type="text" icon="el-icon-d-arrow-right">鏇村</el-button>-->
+ <!-- <el-dropdown-menu slot="dropdown">-->
+ <!-- <el-dropdown-item command="handleResetPwd" icon="el-icon-key" v-hasPermi="['system:user:resetPwd']">閲嶇疆瀵嗙爜</el-dropdown-item>-->
+ <!-- <el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check" v-hasPermi="['system:user:edit']">鍒嗛厤瑙掕壊</el-dropdown-item>-->
+ <!-- </el-dropdown-menu>-->
+ <!-- </el-dropdown>-->
</template>
</el-table-column>
</el-table>
- <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
+ <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
+ :limit.sync="queryParams.pageSize" @pagination="getList" />
</el-col>
</pane>
</splitpanes>
@@ -88,7 +99,9 @@
<el-col :span="12">
<el-form-item label="鐘舵��" prop="status">
<el-radio-group v-model="form.status">
- <el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
+ <el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{
+ dict.label
+ }}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
@@ -102,7 +115,8 @@
<el-col :span="12">
<el-form-item label="瑙掕壊" prop="roleIds">
<el-select v-model="form.roleIds" multiple placeholder="璇烽�夋嫨瑙掕壊" clearable>
- <el-option v-for="item in roleOptions" :key="item.roleId" :label="item.roleName" :value="item.roleId" :disabled="item.status == 1"></el-option>
+ <el-option v-for="item in roleOptions" :key="item.roleId" :label="item.roleName" :value="item.roleId"
+ :disabled="item.status == 1"></el-option>
</el-select>
</el-form-item>
</el-col>
@@ -128,7 +142,8 @@
<el-col :span="12">
<el-form-item label="鍗曚綅" prop="company">
<el-select v-model="form.company" placeholder="璇烽�夋嫨鍗曚綅" style="width: 100%" clearable>
- <el-option v-for="item in postOptions" :key="item.id" :label="item.company" :value="item.id"></el-option>
+ <el-option v-for="item in postOptions" :key="item.id" :label="item.company"
+ :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
@@ -136,30 +151,20 @@
<el-row>
<el-col :span="12">
<el-form-item label="绛惧悕">
- <el-upload
- class="avatar-uploader"
- :action="uploadAction"
- :show-file-list="false"
- accept=".png, .jpg, .jpeg, .gif"
- :on-error="handleUploadError"
- :on-success="handleUploadSuccess"
- :before-upload="handleBeforeUpload">
- <img v-if="signatureUrl" :src="signatureUrl" class="avatar" alt="">
+ <el-upload class="avatar-uploader" :action="uploadAction" :show-file-list="false"
+ :headers="upload.headers" accept=".png, .jpg, .jpeg, .gif" :on-error="handleUploadError"
+ :on-success="handleUploadSuccess" :before-upload="handleBeforeUpload">
+ <img v-if="form.signatureUrl" :src="javaApi + '/img/' + form.signatureUrl" class="avatar" alt="">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="涓汉鐓х墖">
- <el-upload
- class="avatar-uploader"
- :action="uploadAction"
- :show-file-list="false"
- accept=".png, .jpg, .jpeg, .gif"
- :on-error="handleUploadError1"
- :on-success="handleUploadSuccess1"
- :before-upload="handleBeforeUpload1">
- <img v-if="pictureUrl" :src="pictureUrl" class="avatar" alt="">
+ <el-upload class="avatar-uploader" :action="uploadAction" :show-file-list="false"
+ :headers="upload.headers" accept=".png, .jpg, .jpeg, .gif" :on-error="handleUploadError1"
+ :on-success="handleUploadSuccess1" :before-upload="handleBeforeUpload1">
+ <img v-if="form.pictureUrl" :src="javaApi + '/img/' + form.pictureUrl" class="avatar" alt="">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
@@ -174,7 +179,9 @@
<!-- 鐢ㄦ埛瀵煎叆瀵硅瘽妗� -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
- <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
+ <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
+ :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
+ :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
<i class="el-icon-upload"></i>
<div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
<div class="el-upload__tip text-center" slot="tip">
@@ -182,7 +189,8 @@
<el-checkbox v-model="upload.updateSupport" />鏄惁鏇存柊宸茬粡瀛樺湪鐨勭敤鎴锋暟鎹�
</div>
<span>浠呭厑璁稿鍏ls銆亁lsx鏍煎紡鏂囦欢銆�</span>
- <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">涓嬭浇妯℃澘</el-link>
+ <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
+ @click="importTemplate">涓嬭浇妯℃澘</el-link>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
@@ -195,24 +203,22 @@
<el-dialog title="鑾峰彇浜轰簨绯荤粺浜哄憳淇℃伅" :visible.sync="addthirdParty" width="70%">
<div class="body" v-loading="thirdPartyLoading">
<el-row>
- <el-col :span="8" style="height: 70vh;overflow: hidden;" v-if="companiesList.length!=1">
- <el-input v-model="search2" placeholder="杈撳叆鍏抽敭瀛楁悳绱�" clearable size="small"
- @clear="searchFilter2" @keyup.enter.native="searchFilter2"
- prefix-icon="el-icon-search" style="margin-bottom: 20px;width: 90%"/>
+ <el-col :span="8" style="height: 70vh;overflow: hidden;" v-if="companiesList.length != 1">
+ <el-input v-model="search2" placeholder="杈撳叆鍏抽敭瀛楁悳绱�" clearable size="small" @clear="searchFilter2"
+ @keyup.enter.native="searchFilter2" prefix-icon="el-icon-search" style="margin-bottom: 20px;width: 90%" />
<el-tree :data="datathirdParty" node-key="companyId" :props="defaultProps" @node-click="nodeClick2"
- style="height: calc(100% - 42px);" @node-expand="nodeOpen0" :filter-node-method="filterNode2" ref="tree2"
- highlight-current>
+ style="height: calc(100% - 42px);" @node-expand="nodeOpen0" :filter-node-method="filterNode2" ref="tree2"
+ highlight-current>
</el-tree>
</el-col>
- <el-col :span="companiesList.length==1?24:16" style="height: 70vh;padding-left: 8px;">
+ <el-col :span="companiesList.length == 1 ? 24 : 16" style="height: 70vh;padding-left: 8px;">
<div style="display: flex;align-items: center;margin-bottom: 10px">
<span style="width: 140px">鍛樺伐鍙�/鍛樺伐濮撳悕:</span>
<el-input size="small" placeholder="璇疯緭鍏ュ憳宸ュ彿/鍛樺伐濮撳悕" @clear="searchPerson" clearable v-model="userSearch2"
- style="width: 50%"
- @keyup.enter.native="searchPerson()"></el-input>
+ style="width: 50%" @keyup.enter.native="searchPerson()"></el-input>
</div>
<el-table height="67vh" stripe :data="personList" v-loading="personLoad" ref="personTable"
- @selection-change="handleSelectionChange">
+ @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50">
</el-table-column>
<el-table-column prop="employeeID" label="鍛樺伐鍙�">
@@ -332,8 +338,6 @@
url: process.env.VUE_APP_BASE_API + "/system/user/importData"
},
uploadAction: process.env.VUE_APP_BASE_API + '/deviceScope/uploadFile',
- signatureUrl: '',
- pictureUrl: '',
// 鏌ヨ鍙傛暟
queryParams: {
pageNum: 1,
@@ -361,18 +365,18 @@
userName: [
{ required: true, message: "璇峰~鍐欒处鍙�", trigger: "blur" }
],
- nameEn: [
- { required: true, message: "璇疯緭鍏ュ鍚岴N", trigger: "blur" }
- ],
+ // nameEn: [
+ // { required: true, message: "璇疯緭鍏ュ鍚岴N", trigger: "blur" }
+ // ],
status: [
{ required: true, message: "璇烽�夋嫨鐘舵��", trigger: "change" }
],
roleIds: [
{ required: true, message: "璇烽�夋嫨瑙掕壊", trigger: "change" }
],
- password: [
- { required: true, message: "瀵嗙爜涓嶈兘涓虹┖", trigger: "blur" },
- ],
+ // password: [
+ // { required: true, message: "瀵嗙爜涓嶈兘涓虹┖", trigger: "blur" },
+ // ],
phonenumber: [
{
required: true,
@@ -384,7 +388,7 @@
},
// 鑾峰彇涓夋柟浜哄憳寮规
addthirdParty: false,
- thirdPartyLoading:false,
+ thirdPartyLoading: false,
companiesList: [],
search2: '',
datathirdParty: [],
@@ -420,18 +424,18 @@
getList() {
this.loading = true;
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
- this.userList = response.rows;
- this.total = response.total;
- this.loading = false;
- }
+ this.userList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ }
);
},
// 鎵撳紑娣诲姞鏋舵瀯寮规
- addSchema () {
+ addSchema() {
this.addDia = true
},
// 鎻愪氦鏋舵瀯
- addStandardTree () {
+ addStandardTree() {
if (this.addOb.nickName == null || this.addOb.factory == '') {
this.$message.error('鏋勬灦鍚嶇О鏄繀濉」')
return
@@ -484,11 +488,11 @@
// 鐢ㄦ埛鐘舵�佷慨鏀�
handleStatusChange(row) {
let text = row.status === "0" ? "鍚敤" : "鍋滅敤";
- this.$modal.confirm('纭瑕�"' + text + '""' + row.nickName + '"鐢ㄦ埛鍚楋紵').then(function() {
+ this.$modal.confirm('纭瑕�"' + text + '""' + row.nickName + '"鐢ㄦ埛鍚楋紵').then(function () {
return changeUserStatus(row.userId, row.status);
}).then(() => {
this.$modal.msgSuccess(text + "鎴愬姛");
- }).catch(function() {
+ }).catch(function () {
row.status = row.status === "0" ? "1" : "0";
});
},
@@ -511,8 +515,12 @@
sex: undefined,
status: "0",
company: '',
- roleIds: []
+ roleIds: [],
+ signatureUrl: '',
+ pictureUrl: ''
};
+ // this.signatureUrl = '';
+ // this.pictureUrl = ''
this.resetForm("form");
},
/** 鎼滅储鎸夐挳鎿嶄綔 */
@@ -553,21 +561,21 @@
this.thirdPartyLoading = true;
selectCompaniesList().then(res => {
this.companiesList = this.HaveJson(res.data);
- if(this.companiesList.length ==1){
- selectSimpleList({companyId: this.companiesList[0].companyId}).then(res => {
+ if (this.companiesList.length == 1) {
+ selectSimpleList({ companyId: this.companiesList[0].companyId }).then(res => {
this.thirdPartyLoading = false;
this.personListCopy = JSON.parse(JSON.stringify(res.data))
this.personList = res.data
this.$refs.personTable.doLayout()
})
- }else{
+ } else {
this.thirdPartyLoading = false;
}
this.datathirdParty = this.tranListToTreeData(res.data, "ROOT");
}).catch(() => {
this.thirdPartyLoading = false;
})
- if(this.componentData.entity.roleId > 10000)this.$message.warning('鐢变簬鏈�変腑鍏蜂綋瑙掕壊锛屾柊澧炵敤鎴峰皢鎴愪负榛樿瑙掕壊')
+ if (this.componentData.entity.roleId > 10000) this.$message.warning('鐢变簬鏈�変腑鍏蜂綋瑙掕壊锛屾柊澧炵敤鎴峰皢鎴愪负榛樿瑙掕壊')
},
tranListToTreeData(list, rootValue) {
const arr = [];
@@ -597,7 +605,7 @@
this.getNodeParent(node)
if (ob.companyId !== 'SC21') {
this.personLoad = true
- selectSimpleList({companyId: ob.companyId}).then(res => {
+ selectSimpleList({ companyId: ob.companyId }).then(res => {
this.personListCopy = JSON.parse(JSON.stringify(res.data))
this.personList = res.data
this.personLoad = false
@@ -677,6 +685,7 @@
const userId = row.userId || this.ids;
getUser(userId).then(response => {
this.form = response.data;
+ this.form.password = ''
this.roleOptions = response.roles;
this.$set(this.form, "roleIds", response.roleIds);
this.open = true;
@@ -697,18 +706,18 @@
}
},
}).then(({ value }) => {
- resetUserPwd(row.userId, value).then(response => {
- this.$modal.msgSuccess("淇敼鎴愬姛锛屾柊瀵嗙爜鏄細" + value);
- });
- }).catch(() => {});
+ resetUserPwd(row.userId, value).then(response => {
+ this.$modal.msgSuccess("淇敼鎴愬姛锛屾柊瀵嗙爜鏄細" + value);
+ });
+ }).catch(() => { });
},
/** 鍒嗛厤瑙掕壊鎿嶄綔 */
- handleAuthRole: function(row) {
+ handleAuthRole: function (row) {
const userId = row.userId;
this.$router.push("/system/user-auth/role/" + userId);
},
/** 鎻愪氦鎸夐挳 */
- submitForm: function() {
+ submitForm: function () {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.userId != undefined) {
@@ -730,12 +739,12 @@
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
const userIds = row.userId || this.ids;
- this.$modal.confirm('鏄惁纭鍒犻櫎鐢ㄦ埛缂栧彿涓�"' + userIds + '"鐨勬暟鎹」锛�').then(function() {
+ this.$modal.confirm('鏄惁纭鍒犻櫎鐢ㄦ埛缂栧彿涓�"' + userIds + '"鐨勬暟鎹」锛�').then(function () {
return delUser(userIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(() => {});
+ }).catch(() => { });
},
/** 涓嬭浇妯℃澘鎿嶄綔 */
importTemplate() {
@@ -781,14 +790,14 @@
// 濡傛灉涓婁紶鎴愬姛
if (res.code == 200) {
// 鑾峰彇瀵屾枃鏈粍浠跺疄渚�
- let quill = this.Quill;
- // 鑾峰彇鍏夋爣鎵�鍦ㄤ綅缃�
- let length = quill.getSelection().index;
- // 鎻掑叆鍥剧墖 res.url涓烘湇鍔″櫒杩斿洖鐨勫浘鐗囧湴鍧�
- quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
- // 璋冩暣鍏夋爣鍒版渶鍚�
- quill.setSelection(length + 1);
- this.signatureUrl = res.data.url
+ // let quill = this.Quill;
+ // // 鑾峰彇鍏夋爣鎵�鍦ㄤ綅缃�
+ // let length = quill.getSelection().index;
+ // // 鎻掑叆鍥剧墖 res.url涓烘湇鍔″櫒杩斿洖鐨勫浘鐗囧湴鍧�
+ // quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
+ // // 璋冩暣鍏夋爣鍒版渶鍚�
+ // quill.setSelection(length + 1);
+ this.form.signatureUrl = res.data.url
} else {
this.$message.error("鍥剧墖鎻掑叆澶辫触");
}
@@ -819,14 +828,14 @@
// 濡傛灉涓婁紶鎴愬姛
if (res.code == 200) {
// 鑾峰彇瀵屾枃鏈粍浠跺疄渚�
- let quill = this.Quill;
- // 鑾峰彇鍏夋爣鎵�鍦ㄤ綅缃�
- let length = quill.getSelection().index;
- // 鎻掑叆鍥剧墖 res.url涓烘湇鍔″櫒杩斿洖鐨勫浘鐗囧湴鍧�
- quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
- // 璋冩暣鍏夋爣鍒版渶鍚�
- quill.setSelection(length + 1);
- this.pictureUrl = res.data.url
+ // let quill = this.Quill;
+ // // 鑾峰彇鍏夋爣鎵�鍦ㄤ綅缃�
+ // let length = quill.getSelection().index;
+ // // 鎻掑叆鍥剧墖 res.url涓烘湇鍔″櫒杩斿洖鐨勫浘鐗囧湴鍧�
+ // quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
+ // // 璋冩暣鍏夋爣鍒版渶鍚�
+ // quill.setSelection(length + 1);
+ this.form.pictureUrl = res.data.url
} else {
this.$message.error("鍥剧墖鎻掑叆澶辫触");
}
@@ -842,10 +851,12 @@
.search_form {
display: flex;
justify-content: space-between;
+
.options_button {
margin-top: 3px;
}
}
+
.avatar-uploader ::v-deep .el-upload {
border: 1px dashed #666666;
border-radius: 6px;
@@ -853,9 +864,11 @@
position: relative;
overflow: hidden;
}
+
.avatar-uploader ::v-deep .el-upload:hover {
border-color: #409EFF;
}
+
.avatar-uploader-icon {
font-size: 20px;
color: #8c939d;
@@ -864,11 +877,13 @@
line-height: 90px;
text-align: center;
}
+
.avatar {
width: 90px;
height: 90px;
display: block;
}
+
.addButton {
display: flex;
align-items: flex-start;
--
Gitblit v1.9.3