From 32ec691abab0c837f34ce2c4908a40a10b9dbec7 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 29 七月 2022 17:20:15 +0800
Subject: [PATCH] 1.优化项目2.综合看板静态页面初步实现
---
src/views/jcsz/zzjg.vue | 39 +++++++++++++++++----------------------
1 files changed, 17 insertions(+), 22 deletions(-)
diff --git a/src/views/jcsz/zzjg.vue b/src/views/jcsz/zzjg.vue
index d6cecf4..c222506 100644
--- a/src/views/jcsz/zzjg.vue
+++ b/src/views/jcsz/zzjg.vue
@@ -62,20 +62,24 @@
prop="RowNum"
width="50"
label="搴忓彿"
+ fixed
/>
<el-table-column
prop="org_code"
label="缁勭粐缂栫爜"
sortable="custom"
+ min-width="110"
/>
<el-table-column
prop="org_name"
label="缁勭粐鍚嶇О"
sortable="custom"
+ min-width="110"
/>
<el-table-column
prop="description"
label="缁勭粐绫诲瀷"
+ width="110"
sortable="custom"
>
<template slot-scope="{row}">
@@ -90,6 +94,7 @@
prop="parentorg_name"
label="涓婄骇鍗曚綅"
sortable="custom"
+ min-widt="110"
>
<template slot-scope="{row}">
<div v-if="row.parentorg_name===null">/</div>
@@ -99,14 +104,17 @@
<el-table-column
prop="lm_user"
label="鍒涘缓浜哄憳"
+ width="110"
sortable="custom"
/>
<el-table-column
prop="lm_date"
label="鍒涘缓鏃堕棿"
+ width="160"
sortable="custom"
/>
<el-table-column
+ fixed="right"
label="鎿嶄綔"
>
<template slot-scope="{row}">
@@ -144,6 +152,7 @@
<el-form-item label="缁勭粐绫诲瀷" prop="OrgType">
<el-radio-group
v-model="dialogForm.OrgType"
+ :disabled="operation==='edit'"
@change="changeRadio"
>
<el-radio
@@ -160,8 +169,7 @@
<el-form-item label="缁勭粐鍚嶇О" prop="OrgName">
<el-input v-model="dialogForm.OrgName" style="width: 200px" />
</el-form-item>
- <!-- <el-form-item v-if="dialogFormOrgTypeSelected!=='F'" prop="SupUnit" label="涓婄骇鍗曚綅">-->
- <el-form-item v-if="dialogFormOrgTypeSelected!=='D'" prop="SupUnit" label="涓婄骇鍗曚綅">
+ <el-form-item v-if="dialogForm.OrgType!=='閮ㄩ棬'" prop="SupUnit" label="涓婄骇鍗曚綅">
<el-select
v-model="dialogForm.SupUnit"
style="width: 200px"
@@ -192,7 +200,6 @@
import Pagination from '@/components/Pagination'
import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz'
import { getCookie } from '@/utils/auth'
-import { getNewEncodingRules } from '@/utils/global'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
@@ -247,13 +254,12 @@
tableData: [],
dialogVisible: false,
dialogForm: {
- OrgType: '',
+ OrgType: '閮ㄩ棬',
OrgCode: '',
OrgName: '',
SupUnit: ''// 涓婄骇鍗曚綅
},
SupUnitArr: [],
- dialogFormOrgTypeSelected: '',
operation: '',
dialogFormRules: {
OrgType: [
@@ -338,19 +344,8 @@
},
// 鍗曢�夋鏀瑰彉鏃�
async changeRadio(val) {
- if (val.length > 1) {
- this.OrgTypeArr.forEach(item => {
- if (item.label === val) {
- this.dialogFormOrgTypeSelected = item.value
- }
- })
- this.dialogForm.SupUnit = ''
- } else {
- this.dialogFormOrgTypeSelected = val
- }
- // if (this.dialogFormOrgTypeSelected !== 'F') {
- if (this.dialogFormOrgTypeSelected !== 'D') {
- const { data: res } = await PrentOrganization({ orgcode: this.dialogFormOrgTypeSelected })
+ if (this.dialogForm.OrgType !== '閮ㄩ棬') {
+ const { data: res } = await PrentOrganization({ orgcode: this.OrgTypeArr.find(item => item.label === this.dialogForm.OrgType).value })
this.SupUnitArr = res
}
},
@@ -407,7 +402,7 @@
},
// 瀵硅瘽妗嗗叧闂簨浠�
handleClose() {
- this.dialogForm.OrgType = ''
+ this.dialogForm.OrgType = '閮ㄩ棬'
this.dialogForm.OrgCode = ''
this.dialogForm.OrgName = ''
this.dialogForm.SupUnit = ''
@@ -422,18 +417,18 @@
this.$refs.dialogForm.validate(valid => {
if (valid) {
const data = {
- OrganType: this.dialogFormOrgTypeSelected,
+ OrganType: this.dialogForm.OrgType === '閮ㄩ棬' ? 'D' : 'W',
OrganCode: this.dialogForm.OrgCode,
OrganName: this.dialogForm.OrgName,
RightCode: '',
numvalue: '',
// RightCode: this.operation === 'add' ? getCookie('ruleCode') : '',
// numvalue: this.operation === 'add' ? this.numvalue : '',
- // SupUnit: this.dialogFormOrgTypeSelected === 'F' ? '0' : this.dialogForm.SupUnit,
- SupUnit: this.dialogFormOrgTypeSelected === 'D' ? '0' : this.dialogForm.SupUnit,
+ SupUnit: this.dialogForm.OrgType === '閮ㄩ棬' ? '0' : this.dialogForm.SupUnit,
OperType: this.operation === 'add' ? 'Add' : 'Update',
Operator: getCookie('admin')
}
+
AddUpdateOrganization(data).then(res => {
if (res.code === '200') {
this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
--
Gitblit v1.9.3