From 4d85b8e43490a4c502f5095642c458ed999c6513 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 03 三月 2025 15:33:16 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
src/components/Table/lims-table.vue | 3
src/views/system/role/index.vue | 2
src/api/system/user.js | 168 ++++----
src/views/system/dept/index.vue | 106 +---
src/views/CNAS/process/method/methodVerification/index.vue | 204 +++++++++
src/api/cnas/process/method/methodVerification.js | 66 +++
src/views/monitor/logininfor/index.vue | 90 ++--
src/views/monitor/operlog/index.vue | 68 +-
src/views/CNAS/process/method/methodVerification/component/formDIa.vue | 457 +++++++++++++++++++++
src/views/system/user/index.vue | 7
src/main.js | 2
src/views/performance/manHour/workTimeConfig.vue | 8
src/api/system/customer.js | 2
src/views/system/dict/index.vue | 18
src/views/structural/capabilityAndLaboratory/capability/index.vue | 51 +
15 files changed, 989 insertions(+), 263 deletions(-)
diff --git a/src/api/cnas/process/method/methodVerification.js b/src/api/cnas/process/method/methodVerification.js
new file mode 100644
index 0000000..671363e
--- /dev/null
+++ b/src/api/cnas/process/method/methodVerification.js
@@ -0,0 +1,66 @@
+// 瀹為獙瀹ょ殑妫�娴嬭兘鍔涙。妗堢浉鍏虫帴鍙�
+import request from "@/utils/request";
+
+// 鏍囧噯鏂规硶鏇存柊楠岃瘉鍒楄〃
+export function pagesMethodVerify(query) {
+ return request({
+ url: "/processMethodVerify/pagesMethodVerify",
+ method: "get",
+ params: query,
+ });
+}
+
+// 鍒犻櫎鏍囧噯鏂规硶鏇存柊楠岃瘉
+export function delMethodVerify(query) {
+ return request({
+ url: '/processMethodVerify/delMethodVerify',
+ method: 'delete',
+ params: query
+ })
+}
+
+// 瀵煎嚭鏍囧噯鏂规硶鏇存柊楠岃瘉
+export function exportMethodVerify(query) {
+ return request({
+ url: '/processMethodVerify/exportMethodVerify',
+ method: "get",
+ responseType: "blob",
+ params: query,
+ })
+}
+
+//鏌ヨ鏍囧噯鏂规硶楠岃瘉璇︽儏
+export function getMethodVerifyOne(query) {
+ return request({
+ url: "/processMethodVerify/getMethodVerifyOne",
+ method: "get",
+ params: query,
+ });
+}
+
+// 淇敼鏍囧噯鏂规硶楠岃瘉
+export function updateMethodVerify(data) {
+ return request({
+ url: "/processMethodVerify/updateMethodVerify",
+ method: "post",
+ data: data,
+ });
+}
+
+// 鏂板鏍囧噯鏂规硶楠岃瘉
+export function addMethodVerify(data) {
+ return request({
+ url: "/processMethodVerify/addMethodVerify",
+ method: "post",
+ data: data,
+ });
+}
+
+// 楠岃瘉纭
+export function methodVerifyAffirm(query) {
+ return request({
+ url: '/processMethodVerify/methodVerifyAffirm',
+ method: 'get',
+ params: query
+ })
+}
diff --git a/src/api/system/customer.js b/src/api/system/customer.js
index 2399a5f..5b61333 100644
--- a/src/api/system/customer.js
+++ b/src/api/system/customer.js
@@ -28,7 +28,7 @@
export function delCustomById(query) {
return request({
url: '/system/custom/delCustomById',
- method: 'post',
+ method: 'delete',
params: query
})
}
diff --git a/src/api/system/user.js b/src/api/system/user.js
index 8ecfc5a..752aa45 100644
--- a/src/api/system/user.js
+++ b/src/api/system/user.js
@@ -1,191 +1,191 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
import { parseStrEmpty } from "@/utils/ruoyi";
// 鏌ヨ鐢ㄦ埛鍒楄〃
export function listUser(query) {
return request({
- url: '/system/user/list',
- method: 'get',
- params: query
- })
+ url: "/system/user/list",
+ method: "get",
+ params: query,
+ });
}
// 鏌ヨ鐢ㄦ埛璇︾粏
export function getUser(userId) {
return request({
- url: '/system/user/' + parseStrEmpty(userId),
- method: 'get'
- })
+ url: "/system/user/" + parseStrEmpty(userId),
+ method: "get",
+ });
}
// 鏂板鐢ㄦ埛
export function addUser(data) {
return request({
- url: '/system/user',
- method: 'post',
- data: data
- })
+ url: "/system/user",
+ method: "post",
+ data: data,
+ });
}
// 淇敼鐢ㄦ埛
export function updateUser(data) {
return request({
- url: '/system/user',
- method: 'put',
- data: data
- })
+ url: "/system/user",
+ method: "put",
+ data: data,
+ });
}
// 鍒犻櫎鐢ㄦ埛
export function delUser(userId) {
return request({
- url: '/system/user/' + userId,
- method: 'delete'
- })
+ url: "/system/user/" + userId,
+ method: "delete",
+ });
}
// 鐢ㄦ埛瀵嗙爜閲嶇疆
export function resetUserPwd(userId, password) {
const data = {
userId,
- password
- }
+ password,
+ };
return request({
- url: '/system/user/resetPwd',
- method: 'put',
- data: data
- })
+ url: "/system/user/resetPwd",
+ method: "put",
+ data: data,
+ });
}
// 鐢ㄦ埛鐘舵�佷慨鏀�
export function changeUserStatus(userId, status) {
const data = {
userId,
- status
- }
+ status,
+ };
return request({
- url: '/system/user/changeStatus',
- method: 'put',
- data: data
- })
+ url: "/system/user/changeStatus",
+ method: "put",
+ data: data,
+ });
}
// 鏌ヨ鐢ㄦ埛涓汉淇℃伅
export function getUserProfile() {
return request({
- url: '/system/user/profile',
- method: 'get'
- })
+ url: "/system/user/profile",
+ method: "get",
+ });
}
// 淇敼鐢ㄦ埛涓汉淇℃伅
export function updateUserProfile(data) {
return request({
- url: '/system/user/profile',
- method: 'put',
- data: data
- })
+ url: "/system/user/profile",
+ method: "put",
+ data: data,
+ });
}
// 鐢ㄦ埛瀵嗙爜閲嶇疆
export function updateUserPwd(oldPassword, newPassword) {
const data = {
oldPassword,
- newPassword
- }
+ newPassword,
+ };
return request({
- url: '/system/user/profile/updatePwd',
- method: 'put',
- data: data
- })
+ url: "/system/user/profile/updatePwd",
+ method: "put",
+ data: data,
+ });
}
// 鐢ㄦ埛澶村儚涓婁紶
export function uploadAvatar(data) {
return request({
- url: '/system/user/profile/avatar',
- method: 'post',
- headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
- data: data
- })
+ url: "/system/user/profile/avatar",
+ method: "post",
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
+ data: data,
+ });
}
// 鏌ヨ鎺堟潈瑙掕壊
export function getAuthRole(userId) {
return request({
- url: '/system/user/authRole/' + userId,
- method: 'get'
- })
+ url: "/system/user/authRole/" + userId,
+ method: "get",
+ });
}
// 淇濆瓨鎺堟潈瑙掕壊
export function updateAuthRole(data) {
return request({
- url: '/system/user/authRole',
- method: 'put',
- params: data
- })
+ url: "/system/user/authRole",
+ method: "put",
+ params: data,
+ });
}
// 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋�
export function deptTreeSelect() {
return request({
- url: '/system/user/deptTree',
- method: 'get'
- })
+ url: "/system/user/deptTree",
+ method: "get",
+ });
}
// 鑾峰彇浜轰簨绯荤粺缁勭粐
export function selectCompaniesList() {
return request({
- url: '/companies/selectCompaniesList',
- method: 'get'
- })
+ url: "/companies/selectCompaniesList",
+ method: "get",
+ });
}
// 鑾峰彇浜轰簨绯荤粺缁勭粐涓嬬殑浜哄憳
export function selectSimpleList(data) {
return request({
- url: '/companies/selectSimpleList',
- method: 'post',
- params: data
- })
+ url: "/companies/selectSimpleList",
+ method: "post",
+ params: data,
+ });
}
// 鑾峰彇浜轰簨绯荤粺缁勭粐涓嬬殑浜哄憳
export function addPersonUser(data) {
return request({
- url: '/companies/addPersonUser',
- method: 'post',
- params: data
- })
+ url: "/companies/addPersonUser",
+ method: "post",
+ params: data,
+ });
}
// 鑾峰彇瑙掕壊
export function selectRoleList() {
return request({
- url: '/role/selectRoleList',
- method: 'get',
- })
+ url: "/role/selectRoleList",
+ method: "get",
+ });
}
// 鑾峰彇鍗曚綅
export function selectCustomEnum() {
return request({
- url: '/system/custom/selectCustomEnum',
- method: 'get',
- })
+ url: "/system/custom/selectCustomEnum",
+ method: "get",
+ });
}
// 鎻愪氦娣诲姞鏋舵瀯淇℃伅
-export function addDepartment(params) {
+export function addDepartment(data) {
return request({
- url: '/department/addDepartment',
- method: 'post',
- params: params
- })
+ url: "/department/addDepartment",
+ method: "post",
+ data: data,
+ });
}
// 鑾峰彇褰撳墠鐧诲綍浜哄憳閮ㄩ棬
export function selectUserDepartmentLimsName(query) {
return request({
- url: '/system/newUser/selectUserDepartmentLimsName',
- method: 'get'
- })
+ url: "/system/newUser/selectUserDepartmentLimsName",
+ method: "get",
+ });
}
// 鑾峰彇鐢ㄦ埛鍒楄〃
export function selectUserCondition(query) {
diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue
index dcfa7cc..c63f778 100644
--- a/src/components/Table/lims-table.vue
+++ b/src/components/Table/lims-table.vue
@@ -30,7 +30,8 @@
</div>
<!-- 鍥剧墖 -->
<div v-else-if="item.dataType == 'image'">
- <img :src="javaApi + '/img/' + item.prop" alt="" style="width: 40px; height: 40px; margin-top: 10px" />
+ <img :src="javaApi + '/img/' + scope.row[item.prop]" alt=""
+ style="width: 40px; height: 40px; margin-top: 10px" />
</div>
<!-- tag -->
diff --git a/src/main.js b/src/main.js
index 0736a8c..96827ef 100644
--- a/src/main.js
+++ b/src/main.js
@@ -68,7 +68,7 @@
};
Vue.prototype.javaApi = process.env.VUE_APP_BASE_API
? process.env.VUE_APP_BASE_API
- : "http://192.168.0.170:8002";
+ : "http://192.168.1.36:8002";
Vue.prototype.checkPermi = checkPermi;
Vue.prototype.uploadHeader = {
Authorization: "Bearer " + getToken(),
diff --git a/src/views/CNAS/process/method/methodVerification/component/formDIa.vue b/src/views/CNAS/process/method/methodVerification/component/formDIa.vue
new file mode 100644
index 0000000..fef565e
--- /dev/null
+++ b/src/views/CNAS/process/method/methodVerification/component/formDIa.vue
@@ -0,0 +1,457 @@
+<template>
+ <div>
+ <el-dialog :close-on-click-modal="false" :close-on-press-escape="false"
+ :title="operationType === 'edit' ? '缂栬緫' : '鏂板'"
+ :visible.sync="formDia"
+ width="90%" @close="closeDia">
+ <div v-if="operationType === 'edit'" style="text-align: right">
+ <el-button :disabled="form.confirmDate" size="medium" type="primary" @click="validation">楠岃瘉纭</el-button>
+ </div>
+ <table border="1" cellspacing="10" class="tables">
+ <tr>
+ <td>
+ <p>鏍囧噯鏂规硶</p>
+ </td>
+ <td>
+ <p>楠岃瘉鍘熷洜</p>
+ </td>
+ <td>
+ <p>涓昏鎶�鏈彉鍖�</p>
+ </td>
+ <td>
+ <p>娑夊強鏂归潰</p>
+ </td>
+ <td>
+ <p>鏍囧噯瑕佹眰</p>
+ </td>
+ <td>
+ <p>鍑嗗鎯呭喌</p>
+ </td>
+ <td>
+ <p>鏄惁婊¤冻</p>
+ </td>
+ <td>
+ <p>澶囨敞</p>
+ </td>
+ </tr>
+ <tr>
+ <td rowspan="9">
+ <el-input v-model="form.methodName" :rows="6"
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ size="small"
+ type="textarea">
+ </el-input>
+ </td>
+ <td rowspan="9">
+ <el-input v-model="form.verifyReason" :rows="6"
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ size="small"
+ type="textarea">
+ </el-input>
+ </td>
+ <td rowspan="9">
+ <el-input v-model="form.technologyChange" :rows="6"
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ size="small"
+ type="textarea">
+ </el-input>
+ </td>
+ </tr>
+ <tr>
+ <td>浜猴細</td>
+ <td>
+ <el-input v-model="form.personRequirements" size="small" type="textarea"></el-input>
+ </td>
+ <td>
+ <el-input v-model="form.personReadiness" size="small" type="textarea"></el-input>
+ </td>
+ <td>
+ <el-radio-group v-model="form.personIsSatisfied" v-removeAriaHidden>
+ <el-radio :label="0">鍚�</el-radio>
+ <el-radio :label="1">鏄�</el-radio>
+ </el-radio-group>
+ </td>
+ <td>
+ <el-link type="primary" @click="viewWorkPermit">鏌ョ湅涓婂矖璇�</el-link>
+ </td>
+ </tr>
+ <tr>
+ <td>鏈猴細</td>
+ <td>
+ <el-input v-model="form.machineRequirements" size="small" type="textarea"></el-input>
+ </td>
+ <td>
+ <el-input v-model="form.machineReadiness" size="small" type="textarea"></el-input>
+ </td>
+ <td>
+ <el-radio-group v-model="form.machineIsSatisfied" v-removeAriaHidden>
+ <el-radio :label="0">鍚�</el-radio>
+ <el-radio :label="1">鏄�</el-radio>
+ </el-radio-group>
+ </td>
+ <td>
+ <el-link type="primary" @click="viewDevice">鏌ョ湅璁惧</el-link>
+ </td>
+ </tr>
+ <tr>
+ <td>鏂欙細</td>
+ <td>
+ <el-input v-model="form.materialRequirements" size="small" type="textarea"></el-input>
+ </td>
+ <td>
+ <el-input v-model="form.materialReadiness" size="small" type="textarea"></el-input>
+ </td>
+ <td>
+ <el-radio-group v-model="form.materialIsSatisfied" v-removeAriaHidden>
+ <el-radio :label="0">鍚�</el-radio>
+ <el-radio :label="1">鏄�</el-radio>
+ </el-radio-group>
+ </td>
+ <td>
+ <el-input v-model="form.materialRemark" size="small"></el-input>
+ </td>
+ </tr>
+ <tr>
+ <td>娉曪細</td>
+ <td>
+ <el-input v-model="form.methodRequirements" size="small" type="textarea"></el-input>
+ </td>
+ <td>
+ <el-input v-model="form.methodReadiness" size="small" type="textarea"></el-input>
+ </td>
+ <td>
+ <el-radio-group v-model="form.methodIsSatisfied" v-removeAriaHidden>
+ <el-radio :label="0">鍚�</el-radio>
+ <el-radio :label="1">鏄�</el-radio>
+ </el-radio-group>
+ </td>
+ <td>
+ <el-link type="primary" @click="viewTestRecord">鏌ョ湅妫�娴嬭褰�</el-link>
+ </td>
+ </tr>
+ <tr>
+ <td>鐜細</td>
+ <td>
+ <el-input v-model="form.environmentRequirements" size="small" type="textarea"></el-input>
+ </td>
+ <td>
+ <el-input v-model="form.environmentReadiness" size="small" type="textarea"></el-input>
+ </td>
+ <td>
+ <el-radio-group v-model="form.environmentIsSatisfied" v-removeAriaHidden>
+ <el-radio :label="0">鍚�</el-radio>
+ <el-radio :label="1">鏄�</el-radio>
+ </el-radio-group>
+ </td>
+ <td>
+ <el-input v-model="form.traceabilityRemark" size="small"></el-input>
+ </td>
+ </tr>
+ <tr>
+ <td>娴嬮噺婧簮鎬э細</td>
+ <td>
+ <el-input v-model="form.traceabilityRequirements" size="small" type="textarea"></el-input>
+ </td>
+ <td>
+ <el-input v-model="form.traceabilityReadiness" size="small" type="textarea"></el-input>
+ </td>
+ <td>
+ <el-radio-group v-model="form.traceabilityIsSatisfied" v-removeAriaHidden>
+ <el-radio :label="0">鍚�</el-radio>
+ <el-radio :label="1">鏄�</el-radio>
+ </el-radio-group>
+ </td>
+ <td>
+ <el-link type="primary" @click="viewCalibrationsFileDia">鏌ョ湅鏍″噯璇佷功</el-link>
+ </td>
+ </tr>
+ <tr>
+ <td>鏍峰搧绠$悊闇�姹傦細</td>
+ <td>
+ <el-input v-model="form.managementRequirements" size="small" type="textarea"></el-input>
+ </td>
+ <td>
+ <el-input v-model="form.managementReadiness" size="small" type="textarea"></el-input>
+ </td>
+ <td>
+ <el-radio-group v-model="form.managementIsSatisfied" v-removeAriaHidden>
+ <el-radio :label="0">鍚�</el-radio>
+ <el-radio :label="1">鏄�</el-radio>
+ </el-radio-group>
+ </td>
+ <td>
+ <el-input v-model="form.managementRemark" size="small"></el-input>
+ </td>
+ </tr>
+ <tr>
+ <td>鍏朵粬锛�</td>
+ <td>
+ <el-input v-model="form.otherRequirements" size="small" type="textarea"></el-input>
+ </td>
+ <td>
+ <el-input v-model="form.otherReadiness" size="small" type="textarea"></el-input>
+ </td>
+ <td>
+ <el-radio-group v-model="form.otherIsSatisfied" v-removeAriaHidden>
+ <el-radio :label="0">鍚�</el-radio>
+ <el-radio :label="1">鏄�</el-radio>
+ </el-radio-group>
+ </td>
+ <td>
+ <el-input v-model="form.otherRemark" size="small"></el-input>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <p>鏄惁寮曠敤姝ゆ爣鍑嗗紑灞曟娴�:</p>
+ </td>
+ <td colspan="3">鍙互寮曠敤姝ゆ爣鍑嗗紑灞曟娴�</td>
+ <td>
+ <p>纭鏃堕棿:</p>
+ </td>
+ <td>{{form.confirmDate}}</td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <p>鍙傚姞纭浜虹鍚�:</p>
+ </td>
+ <td colspan="5">
+ <el-select v-model="form.confirmUser" multiple placeholder="璇烽�夋嫨" size="small" style="width: 100%" :multiple-limit="5">
+ <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+ </el-select>
+ </td>
+ </tr>
+ </table>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="closeDia">鍙� 娑�</el-button>
+ <el-button :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
+ </span>
+ </el-dialog>
+ <ViewDeviceDialog v-if="viewDeviceDialog" ref="viewDeviceDialog" @closDeviceDia="closDeviceDia" @handleDeviceInfo="handleDeviceInfo"></ViewDeviceDialog>
+ <ViewTestRecord v-if="viewTestRecordDialog" ref="viewTestRecordDialog"></ViewTestRecord>
+ <ViewWorkPermitDia v-if="viewWorkPermitDia" ref="viewWorkPermitDia"></ViewWorkPermitDia>
+ <calibrations-file-dia v-if="calibrationsFileDia" ref="calibrationsFileDia"></calibrations-file-dia>
+ </div>
+</template>
+
+<script>
+import { dateFormat } from '@/utils/date'
+import ViewDeviceDialog from '../../standardMethodsChange/component/ViewDeviceDialog.vue';
+import ViewTestRecord from '../../standardMethodsChange/component/ViewTestRecord.vue';
+import ViewWorkPermitDia from '../../standardMethodsChange/component/viewWorkPermitDia.vue';
+import CalibrationsFileDia from '../../standardMethodsChange/component/calibrationsFileDia.vue';
+import {
+ addMethodVerify,
+ getMethodVerifyOne,
+ methodVerifyAffirm,
+ updateMethodVerify
+} from '@/api/cnas/process/method/methodVerification'
+import { selectUserCondition } from '@/api/cnas/process/method/standardMethodsChange'
+export default {
+ name: 'formDIa',
+ // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+ components: { CalibrationsFileDia, ViewWorkPermitDia, ViewTestRecord, ViewDeviceDialog },
+ props: {
+ operationType: {
+ type: String,
+ default: () => ''
+ }
+ },
+ data() {
+ // 杩欓噷瀛樻斁鏁版嵁
+ return {
+ formDia: false,
+ form: {
+ methodName: '',
+ verifyReason: '',
+ technologyChange: '',
+ personRequirements: '',
+ personReadiness: '',
+ personIsSatisfied: '',
+ personRemark: '',
+ machineRequirements: '',
+ machineReadiness: '',
+ machineIsSatisfied: '',
+ materialRequirements: '',
+ materialReadiness: '',
+ materialIsSatisfied: '',
+ materialRemark: '',
+ methodRequirements: '',
+ methodReadiness: '',
+ methodIsSatisfied: '',
+ environmentRequirements: '',
+ environmentReadiness: '',
+ environmentIsSatisfied: '',
+ traceabilityRequirements: '',
+ traceabilityReadiness: '',
+ traceabilityIsSatisfied: '',
+ traceabilityRemark: '',
+ managementRequirements: '',
+ managementReadiness: '',
+ managementIsSatisfied: '',
+ managementRemark: '',
+ otherRequirements: '',
+ otherReadiness: '',
+ otherIsSatisfied: '',
+ otherRemark: '',
+ machineAttachmentList: []
+ },
+ editLoad: false,
+ info: {
+ methodVerifyId: ''
+ },
+ userList: [],
+ viewDeviceDialog: false,
+ viewTestRecordDialog: false,
+ viewWorkPermitDia: false,
+ calibrationsFileDia: false,
+ };
+ },
+ // 鏂规硶闆嗗悎
+ methods: {
+ openDia(row) {
+ this.formDia = true
+ this.info = row
+ this.getUserList()
+ if (this.operationType === 'edit') {
+ this.searchInfo(row)
+ }
+ },
+ // 鏌ヨ璇︽儏淇℃伅
+ searchInfo (row) {
+ getMethodVerifyOne({methodVerifyId:row.methodVerifyId}).then(res => {
+ if (res.code === 200){
+ this.form = {...res.data}
+ if (this.form.confirmUser) {
+ this.form.confirmUser = this.form.confirmUser.split(',').map(Number)
+ }
+ }
+ }).catch(err => {
+ console.log('err---', err);
+ })
+ },
+ // 鎻愪氦
+ handleEdit() {
+ this.editLoad = true
+ const processMethodSearchNews = this.HaveJson(this.form)
+ processMethodSearchNews.confirmUser = processMethodSearchNews.confirmUser && processMethodSearchNews.confirmUser.join(',')
+ processMethodSearchNews.operationType = 1
+ if (this.operationType === 'edit') {
+ this.editInfo(processMethodSearchNews)
+ } else {
+ this.addInfo(processMethodSearchNews)
+ }
+ },
+ // 鏌ョ湅涓婂矖璇�
+ viewWorkPermit () {
+ this.viewWorkPermitDia = true
+ this.$nextTick(() => {
+ this.$refs.viewWorkPermitDia.openDia(this.form)
+ })
+ },
+ // 鏌ョ湅鏍″噯璇佷功
+ viewCalibrationsFileDia () {
+ this.calibrationsFileDia = true
+ this.$nextTick(() => {
+ this.$refs.calibrationsFileDia.openDia(this.form)
+ })
+ },
+ // 鏌ョ湅璁惧
+ viewDevice () {
+ this.viewDeviceDialog = true
+ this.$nextTick(() => {
+ this.$refs.viewDeviceDialog.openDia(this.form)
+ })
+ },
+ // 鍏抽棴璁惧寮规
+ closDeviceDia () {
+ this.viewDeviceDialog = false
+ },
+ // 鎻愪氦璁惧淇℃伅
+ handleDeviceInfo (machineAttachmentList) {
+ this.viewDeviceDialog = false
+ this.form.machineAttachmentList = machineAttachmentList
+ },
+ // 鏌ョ湅妫�娴嬭褰�
+ viewTestRecord () {
+ this.viewTestRecordDialog = true
+ this.$nextTick(() => {
+ this.$refs.viewTestRecordDialog.openDia(this.info)
+ })
+ },
+ // 鎻愪氦缂栬緫
+ editInfo (processMethodSearchNews) {
+ updateMethodVerify(processMethodSearchNews).then(res => {
+ this.editLoad = false
+ if (res.code === 200){
+ this.$message.success('鎿嶄綔鎴愬姛')
+ this.closeDia()
+ }
+ }).catch(err => {
+ console.log('err---', err);
+ this.editLoad = false
+ })
+ },
+ // 鎻愪氦鏂板
+ addInfo (processMethodSearchNews) {
+ addMethodVerify(processMethodSearchNews).then(res => {
+ this.editLoad = false
+ if (res.code === 200){
+ this.$message.success('鎿嶄綔鎴愬姛')
+ this.closeDia()
+ }
+ }).catch(err => {
+ console.log('err---', err);
+ this.editLoad = false
+ })
+ },
+ // 楠岃瘉纭
+ validation (){
+ methodVerifyAffirm({methodVerifyId:this.info.methodVerifyId}).then(res => {
+ if (res.code === 200){
+ this.form.confirmDate = dateFormat(new Date())
+ }
+
+ }).catch(err => {
+ console.log('err---', err);
+ })
+ },
+ // 鍏抽棴寮规
+ closeDia() {
+ this.formDia = false
+ this.$emit('closeDia');
+ },
+ getUserList(){
+ selectUserCondition().then(res => {
+ if (res.code === 200) {
+ this.userList = res.data
+ }
+ })
+ },
+ }
+};
+</script>
+
+<style scoped>
+>>>.el-dialog {
+ margin-top: 2vh !important;
+}
+>>>.el-dialog__body {
+ max-height: 720px;
+ overflow-y: auto;
+}
+.tables {
+ table-layout: fixed;
+ width: 100%;
+ margin-top: 10px;
+}
+.tables td {
+ height: 34px;
+ width: 100px;
+ text-align: center;
+ font-size: 14px;
+ word-wrap: break-word;
+ white-space: normal;
+ padding: 4px;
+}
+</style>
diff --git a/src/views/CNAS/process/method/methodVerification/index.vue b/src/views/CNAS/process/method/methodVerification/index.vue
new file mode 100644
index 0000000..f6314b7
--- /dev/null
+++ b/src/views/CNAS/process/method/methodVerification/index.vue
@@ -0,0 +1,204 @@
+<template>
+ <div class="capacity-scope">
+ <div class="search">
+ <div>
+ <el-form :model="searchForm" ref="searchForm" size="small" :inline="true">
+ <el-form-item label="鏍囧噯鏂规硶" prop="methodName">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.methodName"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="searchList">鏌� 璇�</el-button>
+ <el-button icon="el-icon-refresh" size="mini" @click="resetSearchForm">閲� 缃�</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+ <div>
+ <el-button size="medium" type="primary" @click="openFormDia('add')">鏂� 澧�</el-button>
+ </div>
+ </div>
+ <div class="table">
+ <div>
+ <TableCard :showForm="false" :showTitle="false">
+ <template v-slot:table>
+ <limsTable
+ :column="tableColumn"
+ :height="'calc(100vh - 23em)'"
+ :table-data="tableData"
+ :table-loading="tableLoading"
+ style="padding: 0 15px;margin-bottom: 16px"
+ :page="page"
+ @pagination="pagination">
+ </limsTable>
+ </template>
+ </TableCard>
+ </div>
+ </div>
+ <formDIa v-if="formDIa" ref="formDIa" :operationType="operationType" @closeDia="closeDia"></formDIa>
+ </div>
+</template>
+
+<script>
+import limsTable from '@/components/Table/lims-table.vue'
+import TableCard from '@/views/CNAS/externalService/serviceAndSupplyPro/component/index.vue';
+import formDIa from './component/formDIa.vue';
+import { delMethodVerify, exportMethodVerify, pagesMethodVerify } from '@/api/cnas/process/method/methodVerification'
+
+export default {
+ name: 'a7-method-verification',
+ // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+ components: { TableCard, limsTable, formDIa },
+ data() {
+ // 杩欓噷瀛樻斁鏁版嵁
+ return {
+ searchForm: {
+ methodName: '',
+ operationType: 1,
+ },
+ options: [
+ { label: '涓婂崐骞�', value: '1' },
+ { label: '涓嬪崐骞�', value: '2' },
+ ],
+ tableColumn: [
+ {
+ label: '鏍囧噯鏂规硶',
+ prop: 'methodName',
+ minWidth: '100'
+ },
+ {
+ label: '楠岃瘉鍘熷洜',
+ prop: 'verifyReason',
+ minWidth: '100'
+ },
+ {
+ label: '涓昏鎶�鏈彉鍖�',
+ prop: 'technologyChange',
+ minWidth: '100'
+ },
+ {
+ dataType: 'action',
+ minWidth: '60',
+ label: '鎿嶄綔',
+ operation: [
+ {
+ name: '缂栬緫',
+ type: 'text',
+ clickFun: (row) => {
+ this.openFormDia('edit', row);
+ },
+ },
+ {
+ name: '瀵煎嚭',
+ type: 'text',
+ clickFun: (row) => {
+ this.downLoadPost(row);
+ },
+ },
+ {
+ name: '鍒犻櫎',
+ type: 'text',
+ color: '#f56c6c',
+ clickFun: (row) => {
+ this.deleteRow(row);
+ },
+ }
+
+ ]
+ }
+ ],
+ tableData: [],
+ tableLoading: false,
+ page: {
+ size: 20,
+ current: 1,
+ },
+ total: 0,
+ formDIa: false,
+ operationType: '',
+ };
+ },
+ mounted() {
+ this.searchList()
+ },
+ // 鏂规硶闆嗗悎
+ methods: {
+ // 鏌ヨ鍒楄〃
+ searchList() {
+ const entity = {
+ methodName: this.searchForm.methodName,
+ operationType: this.searchForm.operationType,
+ }
+ const page = this.page
+ this.tableLoading = true
+ pagesMethodVerify({...page,...entity}).then(res => {
+ this.tableLoading = false
+ if (res.code === 200){
+ this.tableData = res.data.records
+ this.page.total = res.data.total
+ }
+ }).catch(err => {
+ console.log('err---', err);
+ this.tableLoading = false
+ })
+ },
+ // 鍒犻櫎
+ deleteRow (row) {
+ this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ this.tableLoading = true
+ delMethodVerify({methodVerifyId: row.methodVerifyId}).then(res => {
+ this.tableLoading = false
+ if (res.code === 200){
+ this.$message.success('鍒犻櫎鎴愬姛')
+ this.searchList()
+ }
+ }).catch(err => {
+ this.tableLoading = false
+ console.log('err---', err);
+ })
+ })
+ },
+ // 閲嶇疆鏌ヨ鏉′欢
+ resetSearchForm() {
+ this.searchForm.methodName = '';
+ this.searchList()
+ },
+ openFormDia (type, row) {
+ this.formDIa = true
+ this.operationType = type
+ this.$nextTick(() => {
+ this.$refs.formDIa.openDia(row)
+ })
+ },
+ // 瀵煎嚭
+ downLoadPost(row) {
+ exportMethodVerify({methodVerifyId:row.methodVerifyId}).then(res => {
+ this.outLoading = false
+ const blob = new Blob([res],{ type: 'application/msword' });
+ this.$download.saveAs(blob, '鏍囧噯锛堟柟娉曪級纭璁板綍.docx')
+ this.$message.success('瀵煎嚭鎴愬姛')
+ })
+ },
+ // 鍏抽棴寮规
+ closeDia () {
+ this.formDIa = false
+ this.searchList()
+ },
+ // 鍒嗛〉鍒囨崲
+ pagination(page) {
+ this.page.size = page.limit
+ this.searchList();
+ },
+ }
+};
+</script>
+
+<style scoped>
+.search {
+ height: 46px;
+ display: flex;
+ justify-content: space-between;
+}
+</style>
diff --git a/src/views/monitor/logininfor/index.vue b/src/views/monitor/logininfor/index.vue
index d844d5d..8d28b99 100644
--- a/src/views/monitor/logininfor/index.vue
+++ b/src/views/monitor/logininfor/index.vue
@@ -52,51 +52,51 @@
</el-form-item>
</el-form>
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
- <el-button
- type="danger"
- plain
- icon="el-icon-delete"
- size="mini"
- :disabled="multiple"
- @click="handleDelete"
- v-hasPermi="['monitor:logininfor:remove']"
- >鍒犻櫎</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="danger"
- plain
- icon="el-icon-delete"
- size="mini"
- @click="handleClean"
- v-hasPermi="['monitor:logininfor:remove']"
- >娓呯┖</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="primary"
- plain
- icon="el-icon-unlock"
- size="mini"
- :disabled="single"
- @click="handleUnlock"
- v-hasPermi="['monitor:logininfor:unlock']"
- >瑙i攣</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="warning"
- plain
- icon="el-icon-download"
- size="mini"
- @click="handleExport"
- v-hasPermi="['monitor:logininfor:export']"
- >瀵煎嚭</el-button>
- </el-col>
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
- </el-row>
+<!-- <el-row :gutter="10" class="mb8">-->
+<!-- <el-col :span="1.5">-->
+<!-- <el-button-->
+<!-- type="danger"-->
+<!-- plain-->
+<!-- icon="el-icon-delete"-->
+<!-- size="mini"-->
+<!-- :disabled="multiple"-->
+<!-- @click="handleDelete"-->
+<!-- v-hasPermi="['monitor:logininfor:remove']"-->
+<!-- >鍒犻櫎</el-button>-->
+<!-- </el-col>-->
+<!-- <el-col :span="1.5">-->
+<!-- <el-button-->
+<!-- type="danger"-->
+<!-- plain-->
+<!-- icon="el-icon-delete"-->
+<!-- size="mini"-->
+<!-- @click="handleClean"-->
+<!-- v-hasPermi="['monitor:logininfor:remove']"-->
+<!-- >娓呯┖</el-button>-->
+<!-- </el-col>-->
+<!-- <el-col :span="1.5">-->
+<!-- <el-button-->
+<!-- type="primary"-->
+<!-- plain-->
+<!-- icon="el-icon-unlock"-->
+<!-- size="mini"-->
+<!-- :disabled="single"-->
+<!-- @click="handleUnlock"-->
+<!-- v-hasPermi="['monitor:logininfor:unlock']"-->
+<!-- >瑙i攣</el-button>-->
+<!-- </el-col>-->
+<!-- <el-col :span="1.5">-->
+<!-- <el-button-->
+<!-- type="warning"-->
+<!-- plain-->
+<!-- icon="el-icon-download"-->
+<!-- size="mini"-->
+<!-- @click="handleExport"-->
+<!-- v-hasPermi="['monitor:logininfor:export']"-->
+<!-- >瀵煎嚭</el-button>-->
+<!-- </el-col>-->
+<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
+<!-- </el-row>-->
<el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column type="selection" width="55" align="center" />
diff --git a/src/views/monitor/operlog/index.vue b/src/views/monitor/operlog/index.vue
index a084d92..3756c95 100644
--- a/src/views/monitor/operlog/index.vue
+++ b/src/views/monitor/operlog/index.vue
@@ -76,40 +76,40 @@
</el-form-item>
</el-form>
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
- <el-button
- type="danger"
- plain
- icon="el-icon-delete"
- size="mini"
- :disabled="multiple"
- @click="handleDelete"
- v-hasPermi="['monitor:operlog:remove']"
- >鍒犻櫎</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="danger"
- plain
- icon="el-icon-delete"
- size="mini"
- @click="handleClean"
- v-hasPermi="['monitor:operlog:remove']"
- >娓呯┖</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="warning"
- plain
- icon="el-icon-download"
- size="mini"
- @click="handleExport"
- v-hasPermi="['monitor:operlog:export']"
- >瀵煎嚭</el-button>
- </el-col>
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
- </el-row>
+<!-- <el-row :gutter="10" class="mb8">-->
+<!-- <el-col :span="1.5">-->
+<!-- <el-button-->
+<!-- type="danger"-->
+<!-- plain-->
+<!-- icon="el-icon-delete"-->
+<!-- size="mini"-->
+<!-- :disabled="multiple"-->
+<!-- @click="handleDelete"-->
+<!-- v-hasPermi="['monitor:operlog:remove']"-->
+<!-- >鍒犻櫎</el-button>-->
+<!-- </el-col>-->
+<!-- <el-col :span="1.5">-->
+<!-- <el-button-->
+<!-- type="danger"-->
+<!-- plain-->
+<!-- icon="el-icon-delete"-->
+<!-- size="mini"-->
+<!-- @click="handleClean"-->
+<!-- v-hasPermi="['monitor:operlog:remove']"-->
+<!-- >娓呯┖</el-button>-->
+<!-- </el-col>-->
+<!-- <el-col :span="1.5">-->
+<!-- <el-button-->
+<!-- type="warning"-->
+<!-- plain-->
+<!-- icon="el-icon-download"-->
+<!-- size="mini"-->
+<!-- @click="handleExport"-->
+<!-- v-hasPermi="['monitor:operlog:export']"-->
+<!-- >瀵煎嚭</el-button>-->
+<!-- </el-col>-->
+<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
+<!-- </el-row>-->
<el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column type="selection" width="50" align="center" />
diff --git a/src/views/performance/manHour/workTimeConfig.vue b/src/views/performance/manHour/workTimeConfig.vue
index 4fcad16..bcee42c 100644
--- a/src/views/performance/manHour/workTimeConfig.vue
+++ b/src/views/performance/manHour/workTimeConfig.vue
@@ -277,9 +277,11 @@
})
.then(() => {
deleteAuxiliaryWorkingHours({ id: row.id }).then((res) => {
- if (res.code == 201) return;
- this.$message.success("鍒犻櫎鎴愬姛");
- this.refresh();
+ console.log('res',res)
+ if (res.code == 200){
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.refresh();
+ }
});
})
.catch(() => { });
diff --git a/src/views/structural/capabilityAndLaboratory/capability/index.vue b/src/views/structural/capabilityAndLaboratory/capability/index.vue
index 11d2981..713b339 100644
--- a/src/views/structural/capabilityAndLaboratory/capability/index.vue
+++ b/src/views/structural/capabilityAndLaboratory/capability/index.vue
@@ -33,9 +33,9 @@
v-model="itemParameterForm.inspectionItemSubclass" @keyup.enter.native="refreshTable()">
</el-input>
</el-form-item>
- <el-form-item label="妫�楠屽璞�" prop="sample">
+ <el-form-item label="妫�楠屽璞�" prop="specimenName">
<el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="itemParameterForm.sample" @keyup.enter.native="refreshTable()">
+ v-model="itemParameterForm.specimenName" @keyup.enter.native="refreshTable()">
</el-input>
</el-form-item>
<el-form-item>
@@ -123,6 +123,7 @@
import EditForm from "@/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue";
import testObjectEditForm from "@/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue";
import {getToken} from "@/utils/auth";
+import { obtainItemParameterList } from '@/api/structural/laboratoryScope'
export default {
components: {limsTable, EditForm, testObjectEditForm, BindPartDialog, BindSupplierDensityDialog},
@@ -187,17 +188,23 @@
prop: 'laboratoryId',
minWidth: '130',
formatData: (params) => {
- if (params == 1) {
- return '瑁呭鐢电紗璇曢獙瀹�'
- } else if (params == 5) {
- return '閫氫俊浜у搧瀹為獙瀹�'
- } else if (params == 6) {
- return '鐢靛姏浜у搧瀹為獙瀹�'
- } else if (params == 8) {
- return '鍌ㄨ兘浜у搧瀹為獙瀹�'
- } else {
- return '灏勯绾跨紗瀹為獙瀹�'
+ let index = this.laboratoryList.findIndex(item => item.value == params)
+ if(index > -1) {
+ return this.laboratoryList[index].label
+ }else {
+ return null
}
+ // if (params == 1) {
+ // return '瑁呭鐢电紗璇曢獙瀹�'
+ // } else if (params == 5) {
+ // return '閫氫俊浜у搧瀹為獙瀹�'
+ // } else if (params == 6) {
+ // return '鐢靛姏浜у搧瀹為獙瀹�'
+ // } else if (params == 8) {
+ // return '鍌ㄨ兘浜у搧瀹為獙瀹�'
+ // } else {
+ // return '灏勯绾跨紗瀹為獙瀹�'
+ // }
},
formatType: (params) => {
if (params == 1) {
@@ -209,7 +216,7 @@
} else if (params == 8) {
return 'danger'
} else {
- return ''
+ return null
}
}
},
@@ -289,7 +296,7 @@
itemParameterForm: {
inspectionItem: null,
inspectionItemSubclass: null,
- sample: null
+ specimenName: null
},
radio: 0,
productLoad: false,
@@ -361,10 +368,12 @@
currentSupplierDensityRow: {}, // 閫夋嫨闆朵欢缁戝畾鏈潯鏁版嵁鐨勪俊鎭�
bindSupplierDensityDialog: false,
bindPartDialog: false,
- type: null, // 闆朵欢缁戝畾鐨勭被鍨�--0锛氭楠屽璞★紝1锛氫骇鍝佺淮鎶�
+ type: null, // 闆朵欢缁戝畾鐨勭被鍨�--0锛氭楠屽璞★紝1锛氫骇鍝佺淮鎶�,
+ laboratoryList:[]
}
},
created() {
+ this.getItemParameterList()
this.refreshTable()
},
computed: {
@@ -636,6 +645,18 @@
closeBindSupplierDensityDialog () {
this.bindSupplierDensityDialog = false
},
+ getItemParameterList(){
+ obtainItemParameterList().then(res => {
+ let data = []
+ res.data.forEach(a => {
+ data.push({
+ label: a.laboratoryName,
+ value: a.id
+ })
+ })
+ this.laboratoryList = data
+ })
+ }
}
}
</script>
diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index 2483a2b..fa71608 100644
--- a/src/views/system/dept/index.vue
+++ b/src/views/system/dept/index.vue
@@ -2,21 +2,12 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item label="閮ㄩ棬鍚嶇О" prop="deptName">
- <el-input
- v-model="queryParams.deptName"
- placeholder="璇疯緭鍏ラ儴闂ㄥ悕绉�"
- clearable
- @keyup.enter.native="handleQuery"
- />
+ <el-input v-model="queryParams.deptName" 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>
@@ -27,40 +18,22 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
- <el-button
- type="primary"
- plain
- icon="el-icon-plus"
- size="mini"
- @click="handleAdd"
- v-hasPermi="['system:dept:add']"
- >鏂板</el-button>
+ <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
+ v-hasPermi="['system:dept:add']">鏂板</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- type="info"
- plain
- icon="el-icon-sort"
- size="mini"
- @click="toggleExpandAll"
- >灞曞紑/鎶樺彔</el-button>
+ <el-button type="info" plain icon="el-icon-sort" size="mini" @click="toggleExpandAll">灞曞紑/鎶樺彔</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
- <el-table
- v-if="refreshTable"
- v-loading="loading"
- :data="deptList"
- row-key="deptId"
- :default-expand-all="isExpandAll"
- :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
- >
+ <el-table v-if="refreshTable" v-loading="loading" :data="deptList" row-key="deptId"
+ :default-expand-all="isExpandAll" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
<el-table-column prop="deptName" label="閮ㄩ棬鍚嶇О" width="260"></el-table-column>
<el-table-column prop="orderNum" label="鎺掑簭" width="200"></el-table-column>
<el-table-column prop="status" label="鐘舵��" width="100">
<template slot-scope="scope">
- <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
+ <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="200">
@@ -70,28 +43,12 @@
</el-table-column>
<el-table-column label="鎿嶄綔" align="center" class-name="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:dept:edit']"
- >淇敼</el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-plus"
- @click="handleAdd(scope.row)"
- v-hasPermi="['system:dept:add']"
- >鏂板</el-button>
- <el-button
- v-if="scope.row.parentId != 0"
- size="mini"
- type="text"
- icon="el-icon-delete"
- @click="handleDelete(scope.row)"
- v-hasPermi="['system:dept:remove']"
- >鍒犻櫎</el-button>
+ <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
+ v-hasPermi="['system:dept:edit']">淇敼</el-button>
+ <el-button size="mini" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)"
+ v-hasPermi="['system:dept:add']">鏂板</el-button>
+ <el-button v-if="scope.row.parentId != 0" size="mini" type="text" icon="el-icon-delete"
+ @click="handleDelete(scope.row)" v-hasPermi="['system:dept:remove']">鍒犻櫎</el-button>
</template>
</el-table-column>
</el-table>
@@ -102,7 +59,8 @@
<el-row>
<el-col :span="24" v-if="form.parentId !== 0">
<el-form-item label="涓婄骇閮ㄩ棬" prop="parentId">
- <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="閫夋嫨涓婄骇閮ㄩ棬" />
+ <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer"
+ placeholder="閫夋嫨涓婄骇閮ㄩ棬" />
</el-form-item>
</el-col>
</el-row>
@@ -139,11 +97,9 @@
<el-col :span="12">
<el-form-item label="閮ㄩ棬鐘舵��">
<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>
@@ -280,6 +236,7 @@
this.title = "娣诲姞閮ㄩ棬";
listDept().then(response => {
this.deptOptions = this.handleTree(response.data, "deptId");
+ this.deptOptions = this.limitTreeDepth(this.deptOptions, 2)
});
},
/** 灞曞紑/鎶樺彔鎿嶄綔 */
@@ -303,11 +260,12 @@
const noResultsOptions = { deptId: this.form.parentId, deptName: this.form.parentName, children: [] };
this.deptOptions.push(noResultsOptions);
}
+ this.deptOptions = this.limitTreeDepth(this.deptOptions, 2)
});
});
},
/** 鎻愪氦鎸夐挳 */
- submitForm: function() {
+ submitForm: function () {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.deptId != undefined) {
@@ -328,12 +286,26 @@
},
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
- this.$modal.confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.deptName + '"鐨勬暟鎹」锛�').then(function() {
+ this.$modal.confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.deptName + '"鐨勬暟鎹」锛�').then(function () {
return delDept(row.deptId);
}).then(() => {
this.getList();
this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(() => {});
+ }).catch(() => { });
+ },
+ // 閫掑綊鍑芥暟锛岀敤浜庨檺鍒舵爲鐨勬繁搴�
+ limitTreeDepth(options, maxDepth, currentDepth = 1) {
+ return options.map(option => {
+ const newOption = { ...option };
+ if (currentDepth < maxDepth && option.children) {
+ // 濡傛灉褰撳墠娣卞害灏忎簬鏈�澶ф繁搴︿笖瀛樺湪瀛愯妭鐐癸紝鍒欓�掑綊澶勭悊瀛愯妭鐐�
+ newOption.children = this.limitTreeDepth(option.children, maxDepth, currentDepth + 1);
+ } else {
+ // 鍚﹀垯绉婚櫎瀛愯妭鐐�
+ delete newOption.children;
+ }
+ return newOption;
+ });
}
}
};
diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue
index 5609baf..60769cc 100644
--- a/src/views/system/dict/index.vue
+++ b/src/views/system/dict/index.vue
@@ -84,15 +84,15 @@
v-hasPermi="['system:dict:remove']"
>鍒犻櫎</el-button>
</el-col>
- <el-col :span="1.5">
- <el-button
- type="warning"
- plain
- icon="el-icon-download"
- size="mini"
- @click="handleExport"
- v-hasPermi="['system:dict:export']"
- >瀵煎嚭</el-button>
+<!-- <el-col :span="1.5">-->
+<!-- <el-button-->
+<!-- type="warning"-->
+<!-- plain-->
+<!-- icon="el-icon-download"-->
+<!-- size="mini"-->
+<!-- @click="handleExport"-->
+<!-- v-hasPermi="['system:dict:export']"-->
+<!-- >瀵煎嚭</el-button>-->
</el-col>
<el-col :span="1.5">
<el-button
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index 93de712..853e45e 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -403,6 +403,8 @@
handleCheckedTreeConnect(value, type) {
if (type == 'menu') {
this.form.menuCheckStrictly = value ? true : false;
+ this.menuNodeAll = false
+ this.$refs.menu.setCheckedNodes([]);
} else if (type == 'dept') {
this.form.deptCheckStrictly = value ? true : false;
}
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 95dc281..0d8450a 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -8,8 +8,8 @@
<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-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"
@@ -149,7 +149,8 @@
</el-col>
<el-col :span="12">
<el-form-item label="褰掑睘閮ㄩ棬" prop="deptId">
- <treeselect v-model="form.deptId" :options="enabledDeptOptions" :show-count="true" placeholder="璇烽�夋嫨褰掑睘閮ㄩ棬" />
+ <treeselect v-model="form.deptId" :options="enabledDeptOptions" :show-count="true"
+ placeholder="璇烽�夋嫨褰掑睘閮ㄩ棬" />
</el-form-item>
</el-col>
</el-row>
--
Gitblit v1.9.3