From 6bb8da1d317da366769d64120ee645c03f305023 Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期四, 16 五月 2024 14:55:25 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/components/do/b1-ins-order/add.vue | 18
src/components/tool/value-table.vue | 6
src/components/view/role-manage.vue | 1
src/components/view/a6-device-overview.vue | 17
src/components/view/b1-inspect-order-plan.vue | 5
static/js/menu.js | 16
src/components/view/b3-classes.vue | 64 ++
src/components/view/a6-personnel-detail.vue | 41 +
src/components/view/person-manage.vue | 739 ++++++++++++++++++------
src/components/view/a7-standard-method.vue | 4
src/view/index.vue | 6
src/assets/api/controller.js | 8
src/components/view/notice-detail.vue | 20
src/components/view/b2-standard.vue | 462 +++++++++++++-
src/components/tool/scroll-paging.vue | 21
src/view/notice.vue | 60 -
src/components/do/b1-inspect-order-plan/Inspection.vue | 2
src/components/view/a5-laboratory-management.vue | 5
src/components/view/a6-device-management.vue | 88 ++
src/components/view/a6-personnel-overview.vue | 17
src/components/view/index-index.vue | 82 ++
21 files changed, 1,312 insertions(+), 370 deletions(-)
diff --git a/src/assets/api/controller.js b/src/assets/api/controller.js
index 7c20039..3b3d22a 100644
--- a/src/assets/api/controller.js
+++ b/src/assets/api/controller.js
@@ -25,6 +25,7 @@
performanceShift,
auxiliaryWorkingHours,
unPass,
+ companies
}
}
@@ -182,6 +183,7 @@
selectStandardProductListByMethodId: "/standardTree/selectStandardProductListByMethodId", //閫氳繃妫�楠屾爣鍑嗘煡璇㈡楠岄」鐩�
selectStandardMethodEnum: "/standardTree/selectStandardMethodEnum", //鑾峰彇鏍囧噯鏍戜笅鏍囧噯鏂规硶鏋氫妇
getStandardTree2: "/standardTree/getStandardTree2", //鑾峰彇浜у搧鏋舵瀯
+ upStandardProducts: "/standardTree/upStandardProducts", //鑾峰彇浜у搧鏋舵瀯
}
const standardMethod = {
@@ -264,6 +266,7 @@
page:"/performanceShift/page",//缁╂晥绠$悊-鐝-鍒嗛〉鏌ヨ
update:"/performanceShift/update",//缁╂晥绠$悊-鐝-鐝鐘舵�佷慨鏀�
pageYear:"/performanceShift/pageYear",//缁╂晥绠$悊-鐝-骞翠唤鍒嗛〉鏌ヨ
+ export:"/performanceShift/export",//缁╂晥绠$悊-鐝-瀵煎嚭
}
const auxiliaryWorkingHours = {
@@ -276,3 +279,8 @@
const unPass = {
pageInsUnPass:"/unPass/pageInsUnPass", // 鏌ヨ涓嶅悎鏍兼牱鍝佹暟鎹�
}
+
+const companies = {
+ selectCompaniesList: "/companies/selectCompaniesList", //鑾峰彇浜轰簨绯荤粺缁勭粐
+ selectSimpleList: "/companies/selectSimpleList", //鑾峰彇浜轰簨绯荤粺缁勭粐涓嬬殑浜哄憳
+}
diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 75adee2..6cd0389 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -197,7 +197,9 @@
<el-col class="search_thing" :span="6">
<div class="search_label"><span class="required-span">* </span>鏉ユ牱鏂瑰紡锛�</div>
<div class="search_input">
- <el-input size="small" clearable v-model="addObj.formType" :readonly="active>1"></el-input>
+ <el-select v-model="addObj.formType" size="small" :disabled="active>1" style="width: 100%;">
+ <el-option v-for="(a,ai) in formType" :key="ai" :label="a.label" :value="a.value"></el-option>
+ </el-select>
</div>
</el-col>
<el-col class="search_thing" :span="6">
@@ -634,7 +636,8 @@
tell: '',
noLoading: false,
orderType: [],
- filters: []
+ filters: [],
+ formType: []
}
},
watch: {
@@ -653,6 +656,7 @@
this.selectStandardMethods()
this.selectEnumByCategoryForOrderType()
this.selectEnumByCategoryForSonLaboratory()
+ this.selectEnumByCategoryForSampleForm()
if (this.active != 1) {
// 鏌ョ湅/瀹℃牳娴佺▼
// 璇锋眰鎺ュ彛锛屽洖鏄炬暟鎹�
@@ -1126,6 +1130,16 @@
}
})
},
+ selectEnumByCategoryForSampleForm() {
+ this.$axios.post(this.$api.enums.selectEnumByCategory, {
+ category: "鏉ユ牱鏂瑰紡"
+ }).then(res => {
+ this.formType = res.data
+ if(this.formType.length > 0){
+ this.addObj.formType = this.formType[0].value
+ }
+ })
+ },
methodChange(val, row) {
if(val===null||val==='')return
this.getProductLoad = true
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index b41f179..ca447d2 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -571,7 +571,7 @@
const mySet1 = new Set();
this.tableLists = this.currentSample.insProduct.filter(m => {
let num0 = mySet1.size;
- if (m.templateId != null) {
+ if (m.templateId != null&&m.template != null) {
mySet1.add(JSON.stringify({
template: m.template,
templateId: m.templateId
diff --git a/src/components/tool/scroll-paging.vue b/src/components/tool/scroll-paging.vue
index 41b2e10..367409d 100644
--- a/src/components/tool/scroll-paging.vue
+++ b/src/components/tool/scroll-paging.vue
@@ -2,14 +2,14 @@
<div class="scroll-pagination" ref="content" @scroll="onScroll">
<slot></slot>
<el-button
- v-if="isLoding"
+ v-show="isLoding"
type="text"
style="display: flex; margin: 0 auto; color: #909399"
><i class="el-icon-loading" style="font-size:20px"></i
></el-button>
<el-button
type="text"
- v-if="finishLoding"
+ v-show="finishLoding"
style="display: flex; margin: 0 auto; color: #909399"
>宸茬粡娌℃湁鏇村鍟</el-button
>
@@ -23,6 +23,18 @@
finishLoding: {
type:Boolean,
default:false
+ },
+ list:{
+ type:Array,
+ default:()=>[]
+ }
+ },
+ watch: {
+ list:{
+ deep:true,
+ handler(){
+ this.isLoding = false
+ }
}
},
data() {
@@ -32,7 +44,7 @@
},
created(){
// 闃叉姈
- this.onScroll = this.debounce(this.scrollFn,2000);
+ this.onScroll = this.debounce(this.scrollFn,500);
// 鑺傛祦
// this.onScroll = this.throttle(this.scrollFn,1000);
},
@@ -55,8 +67,7 @@
this.isLoding = true
setTimeout(() => {
this.$emit('load')
- this.isLoding = false
- }, 1000)
+ }, 500)
},
debounce(func, delay) {
let timer = null;
diff --git a/src/components/tool/value-table.vue b/src/components/tool/value-table.vue
index 097a84d..20b9a47 100644
--- a/src/components/tool/value-table.vue
+++ b/src/components/tool/value-table.vue
@@ -95,6 +95,12 @@
align-items: center;
justify-content: center;
}
+ .el-table__empty-text{
+ text-align: left;
+ width: 100%;
+ display: inline-block;
+ margin-left: 200px;
+ }
</style>
<template>
diff --git a/src/components/view/a5-laboratory-management.vue b/src/components/view/a5-laboratory-management.vue
index 82e8e6d..8a3ad69 100644
--- a/src/components/view/a5-laboratory-management.vue
+++ b/src/components/view/a5-laboratory-management.vue
@@ -244,8 +244,8 @@
children:[]
},
{
- value:'棰濆绫诲瀷',
- label:'棰濆绫诲瀷',
+ value:'鎶ュ憡绫诲瀷',
+ label:'鎶ュ憡绫诲瀷',
children:null
},
],
@@ -283,7 +283,6 @@
return m
})
this.options[0].children = arr;
- this.fileComponentData.tagField.type.select = arr;
this.fileComponentData.selectField.type.select = arr;
})
},
diff --git a/src/components/view/a6-device-management.vue b/src/components/view/a6-device-management.vue
index ad072e5..7fc51d6 100644
--- a/src/components/view/a6-device-management.vue
+++ b/src/components/view/a6-device-management.vue
@@ -107,14 +107,14 @@
</div>
</el-image>
<!-- 琛ㄥ崟 -->
- <el-form :label-position="labelPosition" :model="formData" label-width="100px">
- <el-form-item label="浠櫒鍚嶇О:">
+ <el-form :label-position="labelPosition" :model="formData" label-width="120px">
+ <el-form-item label="浠櫒鍚嶇О:" required>
<el-input :disabled="isUp" v-model="formData.deviceName" size="small"></el-input>
</el-form-item>
- <el-form-item label="浠櫒鍚嶇ОEN:">
+ <el-form-item label="浠櫒鍚嶇ОEN:" required>
<el-input :disabled="isUp" v-model="formData.enDeviceName" size="small"></el-input>
</el-form-item>
- <el-form-item label="瑙勬牸鍨嬪彿:">
+ <el-form-item label="瑙勬牸鍨嬪彿:" required>
<el-input :disabled="isUp" v-model="formData.specificationModel" size="small"></el-input>
</el-form-item>
<el-form-item label="鐢熶骇鍘傚:">
@@ -132,7 +132,7 @@
<el-form-item label="鍑哄巶缂栧彿:">
<el-input :disabled="isUp" v-model="formData.factoryNo" size="small"></el-input>
</el-form-item>
- <el-form-item label="绠$悊缂栧彿:">
+ <el-form-item label="绠$悊缂栧彿:" required>
<el-input :disabled="isUp" v-model="formData.managementNumber" size="small"></el-input>
</el-form-item>
<el-form-item label="璐疆鏃ユ湡:">
@@ -140,7 +140,7 @@
format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="閫夋嫨鏃ユ湡">
</el-date-picker>
</el-form-item>
- <el-form-item label="鍚敤鏃ユ湡:">
+ <el-form-item label="鍚敤鏃ユ湡:" required>
<el-date-picker :disabled="isUp" style="width:100%" v-model="formData.activationDate" type="date"
format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="閫夋嫨鏃ユ湡">
</el-date-picker>
@@ -205,13 +205,13 @@
<el-form-item label="鍗曚环(涓囧厓):">
<el-input :disabled="isUp" v-model="formData.unitPrice" size="small"></el-input>
</el-form-item>
- <el-form-item label="褰撳墠鐘舵��:">
+ <el-form-item label="褰撳墠鐘舵��:" required>
<el-select :disabled="isUp" v-model="formData.deviceStatus" placeholder="璇烽�夋嫨" size="small" style="width:100%">
<el-option v-for="item in deviceStatusList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
- <el-form-item label="鏍″噯鍛ㄦ湡锛堟湀锛�:">
+ <el-form-item label="鏍″噯鍛ㄦ湡锛堟湀锛�:" required>
<el-input :disabled="isUp" v-model="formData.calibrationDate" size="small"></el-input>
</el-form-item>
<el-form-item label="鍥剧墖:">
@@ -258,14 +258,14 @@
</div>
</el-image>
<!-- 琛ㄥ崟 -->
- <el-form :label-position="labelPosition" :model="formData2" label-width="100px">
- <el-form-item label="浠櫒鍚嶇О:">
+ <el-form :label-position="labelPosition" :model="formData2" label-width="120px">
+ <el-form-item label="浠櫒鍚嶇О:" required>
<el-input v-model="formData2.deviceName" size="small"></el-input>
</el-form-item>
- <el-form-item label="浠櫒鍚嶇ОEN:">
+ <el-form-item label="浠櫒鍚嶇ОEN:" required>
<el-input v-model="formData2.enDeviceName" size="small"></el-input>
</el-form-item>
- <el-form-item label="瑙勬牸鍨嬪彿:">
+ <el-form-item label="瑙勬牸鍨嬪彿:" required>
<el-input v-model="formData2.specificationModel" size="small"></el-input>
</el-form-item>
<el-form-item label="鐢熶骇鍘傚:">
@@ -286,7 +286,7 @@
<el-form-item label="鍑哄巶缂栧彿:">
<el-input v-model="formData2.factoryNo" size="small"></el-input>
</el-form-item>
- <el-form-item label="绠$悊缂栧彿:">
+ <el-form-item label="绠$悊缂栧彿:" required>
<el-input v-model="formData2.managementNumber" size="small"></el-input>
</el-form-item>
<el-form-item label="璐疆鏃ユ湡:">
@@ -294,7 +294,7 @@
format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="閫夋嫨鏃ユ湡">
</el-date-picker>
</el-form-item>
- <el-form-item label="鍚敤鏃ユ湡:">
+ <el-form-item label="鍚敤鏃ユ湡:" required>
<el-date-picker style="width:100%" v-model="formData2.activationDate" type="date"
format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="閫夋嫨鏃ユ湡">
</el-date-picker>
@@ -348,13 +348,13 @@
<el-form-item label="鍗曚环(涓囧厓):">
<el-input v-model="formData2.unitPrice" size="small"></el-input>
</el-form-item>
- <el-form-item label="褰撳墠鐘舵��:">
+ <el-form-item label="褰撳墠鐘舵��:" required>
<el-select v-model="formData2.deviceStatus" placeholder="璇烽�夋嫨" size="small" style="width:100%">
<el-option v-for="item in deviceStatusList" :key="item.id" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
- <el-form-item label="鏍″噯鍛ㄦ湡锛堟湀锛�:">
+ <el-form-item label="鏍″噯鍛ㄦ湡锛堟湀锛�:" required>
<el-input v-model="formData2.calibrationDate" size="small"></el-input>
</el-form-item>
<el-form-item label="鍥剧墖:">
@@ -667,6 +667,34 @@
}
},
submitForm() {
+ if(!this.formData.deviceName){
+ this.$message.error('鏈緭鍏ヤ华鍣ㄥ悕绉�')
+ return
+ }
+ if(!this.formData.enDeviceName){
+ this.$message.error('鏈緭鍏ヤ华鍣ㄥ悕绉癊N')
+ return
+ }
+ if(!this.formData.specificationModel){
+ this.$message.error('鏈緭鍏ヨ鏍煎瀷鍙�')
+ return
+ }
+ if(!this.formData.managementNumber){
+ this.$message.error('鏈緭鍏ョ鐞嗙紪鍙�')
+ return
+ }
+ if(!this.formData.activationDate){
+ this.$message.error('鏈緭鍏ュ惎鐢ㄦ棩鏈�')
+ return
+ }
+ if(!this.formData.deviceStatus){
+ this.$message.error('鏈�夋嫨褰撳墠鐘舵��')
+ return
+ }
+ if(!this.formData.calibrationDate){
+ this.$message.error('鏈緭鍏ユ牎鍑嗗懆鏈燂紙鏈堬級')
+ return
+ }
delete this.formData.createTime
delete this.formData.updateTime
delete this.formData.createUser
@@ -693,6 +721,34 @@
})
},
submitForm2() {
+ if(!this.formData2.deviceName){
+ this.$message.error('鏈緭鍏ヤ华鍣ㄥ悕绉�')
+ return
+ }
+ if(!this.formData2.enDeviceName){
+ this.$message.error('鏈緭鍏ヤ华鍣ㄥ悕绉癊N')
+ return
+ }
+ if(!this.formData2.specificationModel){
+ this.$message.error('鏈緭鍏ヨ鏍煎瀷鍙�')
+ return
+ }
+ if(!this.formData2.managementNumber){
+ this.$message.error('鏈緭鍏ョ鐞嗙紪鍙�')
+ return
+ }
+ if(!this.formData2.activationDate){
+ this.$message.error('鏈緭鍏ュ惎鐢ㄦ棩鏈�')
+ return
+ }
+ if(!this.formData2.deviceStatus){
+ this.$message.error('鏈�夋嫨褰撳墠鐘舵��')
+ return
+ }
+ if(!this.formData2.calibrationDate){
+ this.$message.error('杈撳叆鏍″噯鍛ㄦ湡锛堟湀锛�')
+ return
+ }
this.upLoad2 = true;
this.formData2.insProductIds = this.formData2.insProductIds.join()
this.$axios.post(this.$api.deviceScope.addDeviceParameter, this.formData2, {
diff --git a/src/components/view/a6-device-overview.vue b/src/components/view/a6-device-overview.vue
index 196ea2e..1e8995e 100644
--- a/src/components/view/a6-device-overview.vue
+++ b/src/components/view/a6-device-overview.vue
@@ -148,11 +148,11 @@
</div>
<div class="search_thing" style="padding-left: 30px;">
<el-button size="small" @click="refresh()">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="currentPage= 1,list=[],finishLoding = false,refreshTable()">鏌� 璇�</el-button>
+ <el-button size="small" type="primary" @click="currentPage= 1,keyMap = {},list=[],finishLoding = false,refreshTable()">鏌� 璇�</el-button>
</div>
</div>
<div class="table" v-loading="loading">
- <scroll-pagination @load="refreshTable" :finishLoding="finishLoding">
+ <scroll-pagination @load="refreshTable" :finishLoding="finishLoding" :list="list">
<ul class="card">
<li v-for="(m,i) in list" :key="i">
<el-image class="img" :src="javaApi+'/img/'+m.imageUpload">
@@ -218,17 +218,27 @@
pageSize: 16, // 涓�椤�16鏉�
total: '',
loading: true, // 缁勪欢loading鐨勫睍绀�,榛樿涓簍rue
- finishLoding: false // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+ finishLoding: false, // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+ keyMap: {}
}
},
created() {
this.selectEnumByCategory()
+ this.keyMap = {};
this.currentPage = 1;
this.list = [];
this.refreshTable();
},
methods: {
refreshTable() {
+ const key = `_${this.currentPage}`
+ const value = this.keyMap[key]
+ // 濡傛灉value瀛樺湪锛岃〃绀虹紦瀛樻湁鍊硷紝閭d箞闃绘璇锋眰
+ if(value) {
+ return
+ }
+ // value涓嶅瓨鍦紝琛ㄧず绗竴娆¤姹�,璁剧疆鍗犱綅
+ this.keyMap[key] = 'temp'
if(this.currentPage==1){
this.loading = true
}
@@ -284,6 +294,7 @@
})
},
refresh() {
+ this.keyMap = {};
this.currentPage= 1;
this.list=[];
this.finishLoding = false;
diff --git a/src/components/view/a6-personnel-detail.vue b/src/components/view/a6-personnel-detail.vue
index d4ffde8..3778dec 100644
--- a/src/components/view/a6-personnel-detail.vue
+++ b/src/components/view/a6-personnel-detail.vue
@@ -177,6 +177,46 @@
},
data() {
return {
+ datathirdParty:[{
+ id: 1,
+ label: '涓�绾� 1',
+ children: [{
+ id: 4,
+ label: '浜岀骇 1-1',
+ children: [{
+ id: 9,
+ label: '涓夌骇 1-1-1'
+ }, {
+ id: 10,
+ label: '涓夌骇 1-1-2'
+ }]
+ }]
+ }, {
+ id: 2,
+ label: '涓�绾� 2',
+ children: [{
+ id: 5,
+ label: '浜岀骇 2-1'
+ }, {
+ id: 6,
+ label: '浜岀骇 2-2'
+ }]
+ }, {
+ id: 3,
+ label: '涓�绾� 3',
+ children: [{
+ id: 7,
+ label: '浜岀骇 3-1'
+ }, {
+ id: 8,
+ label: '浜岀骇 3-2'
+ }]
+ }],
+ defaultProps: {
+ children: 'children',
+ label: 'label'
+ },
+ addthirdParty:false,
search: null,
list: [],
selectTree: '',
@@ -218,6 +258,7 @@
this.selectTreeList()
},
methods: {
+
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
diff --git a/src/components/view/a6-personnel-overview.vue b/src/components/view/a6-personnel-overview.vue
index 52b9a24..48f969c 100644
--- a/src/components/view/a6-personnel-overview.vue
+++ b/src/components/view/a6-personnel-overview.vue
@@ -87,11 +87,11 @@
</div>
<div class="search_thing" style="padding-left: 30px;">
<el-button size="small" @click="refresh()">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="currentPage= 1,list=[],finishLoding = false,refreshTable()">鏌� 璇�</el-button>
+ <el-button size="small" type="primary" @click="currentPage= 1,list=[],finishLoding = false,keyMap = {},refreshTable()">鏌� 璇�</el-button>
</div>
</div>
<div class="table" v-loading="loading">
- <scroll-pagination @load="refreshTable" :finishLoding="finishLoding">
+ <scroll-pagination @load="refreshTable" :finishLoding="finishLoding" :list="list">
<ul class="card" style="margin-top: 10px;">
<li v-for="(m,i) in list" :key="i">
<el-image style="width: 80px;
@@ -143,16 +143,26 @@
pageSize: 16, // 涓�椤�16鏉�
total: '',
loading: true, // 缁勪欢loading鐨勫睍绀�,榛樿涓簍rue
- finishLoding: false // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+ finishLoding: false, // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+ keyMap: {}
}
},
created() {
+ this.keyMap = {};
this.currentPage = 1;
this.list = [];
this.refreshTable();
},
methods: {
refreshTable() {
+ const key = `_${this.currentPage}`
+ const value = this.keyMap[key]
+ // 濡傛灉value瀛樺湪锛岃〃绀虹紦瀛樻湁鍊硷紝閭d箞闃绘璇锋眰
+ if(value) {
+ return
+ }
+ // value涓嶅瓨鍦紝琛ㄧず绗竴娆¤姹�,璁剧疆鍗犱綅
+ this.keyMap[key] = 'temp'
if(this.currentPage==1){
this.loading = true
}
@@ -187,6 +197,7 @@
})
},
refresh() {
+ this.keyMap = {};
this.currentPage= 1;
this.list=[];
this.finishLoding = false;
diff --git a/src/components/view/a7-standard-method.vue b/src/components/view/a7-standard-method.vue
index b210005..e291006 100644
--- a/src/components/view/a7-standard-method.vue
+++ b/src/components/view/a7-standard-method.vue
@@ -164,8 +164,8 @@
multiple: true
},
},
- requiredAdd: ['code', 'name', 'structureTestObjectId', 'isProduct', 'isUse', 'nameEn'],
- requiredUp: ['code', 'name', 'structureTestObjectId', 'isProduct', 'isUse', 'nameEn']
+ requiredAdd: ['code', 'name', 'isProduct', 'isUse', 'nameEn'],
+ requiredUp: ['code', 'name', 'isProduct', 'isUse', 'nameEn']
},
entityCopy: {},
upIndex: 0,
diff --git a/src/components/view/b1-inspect-order-plan.vue b/src/components/view/b1-inspect-order-plan.vue
index 54a6f86..6ae4714 100644
--- a/src/components/view/b1-inspect-order-plan.vue
+++ b/src/components/view/b1-inspect-order-plan.vue
@@ -102,6 +102,11 @@
.ins-order-plan-main .el-form-item__label{
color: #000;
}
+
+ .ins-order-plan-main .el-table th.el-table__cell>.cell{
+ height: 46px;
+ line-height: 30px;
+ }
</style>
<template>
<div class="ins-order-plan-main">
diff --git a/src/components/view/b2-standard.vue b/src/components/view/b2-standard.vue
index 46dba57..a6e46cc 100644
--- a/src/components/view/b2-standard.vue
+++ b/src/components/view/b2-standard.vue
@@ -1,12 +1,12 @@
<style scoped>
.standard {
- padding: 20px 0;
+ padding: 10px 0;
display: flex;
}
.left {
width: 270px;
- height: calc(100% - 40px - 30px);
+ height: calc(100% - 40px - 10px);
background-color: white;
padding: 15px;
}
@@ -38,8 +38,8 @@
}
.right .title {
- height: 50px;
- line-height: 50px;
+ height: 34px;
+ line-height: 34px;
padding: 0 10px;
background-color: white;
}
@@ -51,19 +51,65 @@
.product_table {
border-top: 1px solid #ebeef5;
- height: calc(100% - 275px);
+ height: calc(100% - 235px);
margin-top: 5px;
background-color: white;
user-select: none;
}
.product_table .el-table {
- height: 100%;
+ height: calc(100% - 35px) !important;
}
.sort {
width: 80% !important;
overflow: hidden;
+ }
+ >>>.el-table__body-wrapper{
+ height: calc(100% - 46px) !important;
+ }
+ >>>.header-class{
+ height: 40px !important;
+ }
+ >>>.header-class th.el-table__cell>.cell{
+ line-height: 20px !important;
+ padding-top: 0 !important;
+ padding-bottom: 0 !important;
+ }
+ >>>.el-table__row{
+ height: 35px !important;
+ }
+ .search{
+ height: 20%;
+ border-bottom: 1px solid #ebeef5;
+ margin-bottom: 16px;
+ display: flex;
+ align-items: center;
+ box-sizing: border-box;
+ padding-bottom: 10px;
+ }
+ .search-item{
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ }
+ .search-item .el-row{
+ display: flex;
+ align-items: center;
+ }
+ .search-item .el-col{
+ margin-left: 0;
+ }
+ .more-edit .dialog-footer{
+ position: absolute;
+ top: 15px;
+ right: 70px;
+ }
+ >>>.more-edit .el-dialog__body{
+ height: calc(100vh - 90px);
+ }
+ >>>.is-disabled .el-textarea__inner{
+ background: rgba(0, 0, 0, 0.05) !important;
}
</style>
<style>
@@ -129,21 +175,13 @@
</el-tree>
</div>
<div class="right">
- <el-row class="title">
- <el-col :span="24" style="font-size: 14px;color: #999;">{{selectTree}}</el-col>
- <!-- <el-col :span="selectTree==''?24:14" style="text-align: right;" v-if="selectTree!=''"> -->
- <!-- <el-button size="small" type="primary" @click="addStandardDia = true"
- v-if="addStandardMethod">鏂板鏍囧噯</el-button>
- <el-button size="small" type="primary" @click="addProductDia = true" v-if="addStandardProduct">鏂板椤圭洰</el-button>
- <el-button size="small" @click="delStandardProductByIds" v-if="delStandardProduct">
- <i class="el-icon-delete" style="color: #3A7BFA;"></i>
- <span style="color: #3A7BFA;">鍒犻櫎</span>
- </el-button> -->
- <!-- </el-col> -->
+ <el-row class="title" style="width: 100%;">
+ <el-col :span="20" style="font-size: 14px;color: #999;">{{selectTree}}</el-col>
+ <el-button size="small" type="primary" @click="handleMore" style="position: absolute;right: 0px;top: 1px;" v-if="upStandardProduct">鎵归噺缂栬緫</el-button>
</el-row>
<el-row class="standard_table" v-loading="tableLoad">
- <el-table class="el-table" :data="standardList" style="width: 100%;" height="220" tooltip-effect="dark"
- highlight-current-row @row-click="rowClick" ref="standard">
+ <el-table class="el-table" :data="standardList" style="width: 100%;height: 220px !important;" height="220" tooltip-effect="dark"
+ highlight-current-row @row-click="rowClick" ref="standard" header-row-class-name="header-class">
<el-table-column prop="code" label="鏍囧噯缂栧彿" show-overflow-tooltip width="200">
<template slot-scope="scope">
<span style="color: red;font-size: 14px;">{{scope.row['code']}}</span>
@@ -162,11 +200,15 @@
</el-row>
<el-row class="product_table" v-loading="tableLoad2">
<el-table :data="productList" ref="productTable" style="width: 100%;" height="100%" tooltip-effect="dark" stripe
- :fit="true" border @selection-change="handleSelectionChange" :row-class-name="tableRowClassName"
- @select="upProductSelect" @select-all="handleAll">
- <el-table-column type="selection" width="65">
+ :fit="true" border
+ @selection-change="handleSelectionChange" :row-class-name="tableRowClassName"
+ @select="upProductSelect"
+ @select-all="handleAll"
+ class="productTable"
+ header-row-class-name="header-class">
+ <el-table-column type="selection" width="50" >
</el-table-column>
- <el-table-column prop="model" label="鍨嬪彿" min-width="120" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="model" label="鍨嬪彿" min-width="100" show-overflow-tooltip></el-table-column>
<el-table-column prop="inspectionItem" label="妫�楠岄」" min-width="140" show-overflow-tooltip></el-table-column>
<!-- <el-table-column prop="inspectionItemClassify" label="妫�楠岄」绫诲瀷" width="120" show-overflow-tooltip></el-table-column> -->
<el-table-column prop="inspectionItemSubclass" label="妫�楠岄」瀛愰」" min-width="140"
@@ -218,7 +260,7 @@
<el-table-column prop="manHourGroup" label="宸ユ椂鍒嗙粍" width="100" show-overflow-tooltip></el-table-column>
<el-table-column prop="templateId" label="妯℃澘" width="200">
<template slot-scope="scope">
- <el-select v-model="scope.row.templateId" size="small" filterable
+ <el-select v-model="scope.row.templateId" size="small" filterable :disabled="!upStandardProduct"
@change="(value)=>upStandardProductListOfTemplate(value,scope.row.id)">
<el-option v-for="(a, ai) in templateList" :key="ai" :label="a.name" :value="a.id"></el-option>
</el-select>
@@ -231,6 +273,14 @@
</template>
</el-table-column>
</el-table>
+ <el-pagination
+ style="position: absolute;right: 16px;bottom: 1px;"
+ @current-change="handleCurrentChange"
+ :current-page="currentPage"
+ layout="total, prev, pager, next, jumper"
+ :page-size="50"
+ :total="total">
+ </el-pagination>
</el-row>
</div>
<el-dialog title="鍒嗙被娣诲姞" :visible.sync="addDia" width="400px">
@@ -273,7 +323,114 @@
<el-button type="primary" @click="addStandardTree" :loading="addLoad">纭� 瀹�</el-button>
</span>
</el-dialog>
- <el-dialog title="鏂板鏍囧噯" :visible.sync="addStandardDia" width="400px">
+ <el-dialog title="鎵归噺缂栬緫" :visible.sync="moreEdit" width="90%" style="height: 100vh;" class="more-edit">
+ <div class="body" style="height: 100%;display: flex;flex-direction: column;">
+ <div class="search">
+ <div class="search-item">
+ <el-row style="width: 25%;margin-bottom: 16px;">
+ <el-col :span="6" style="text-align: right;">
+ <!-- <span class="required-span">* </span> -->
+ 瑕佹眰鍊硷細</el-col>
+ <el-col :span="16">
+ <el-input size="small" v-model="moreInfo.ask" clearable :disabled="moreSelects.length==0"></el-input>
+ </el-col>
+ </el-row>
+ <el-row style="width: 25%;margin-bottom: 16px;">
+ <el-col :span="6" style="text-align: right;">
+ <!-- <span class="required-span">* </span> -->
+ 瑕佹眰鎻忚堪锛�</el-col>
+ <el-col :span="16" style="display: flex;align-items: flex-start;height: 100%;">
+ <el-input size="small" clearable type="textarea" :autosize="{ minRows: 1, maxRows: 3}" v-model="moreInfo.tell" :disabled="moreSelects.length==0"></el-input>
+ </el-col>
+ </el-row>
+ <el-row style="width: 25%;margin-bottom: 16px;">
+ <el-col :span="6" style="text-align: right;">
+ <!-- <span class="required-span">* </span> -->
+ 璇曢獙鏂规硶锛�</el-col>
+ <el-col :span="16">
+ <el-select v-model="moreInfo.methodS" size="small" filterable style="width: 100%;" :disabled="moreSelects.length==0">
+ <el-option v-for="(a, ai) in methodList" :key="ai" :label="a.label" :value="a.value"></el-option>
+ </el-select>
+ </el-col>
+ </el-row>
+ <el-row style="width: 25%;margin-bottom: 16px;">
+ <el-col :span="6" style="text-align: right;">
+ <!-- <span class="required-span">* </span> -->
+ 鍗曚环(鍏�)锛�</el-col>
+ <el-col :span="16" >
+ <el-input size="small" v-model="moreInfo.price" clearable :disabled="moreSelects.length==0"></el-input>
+ </el-col>
+ </el-row>
+ <el-row style="width: 25%;">
+ <el-col :span="6" style="text-align: right;">
+ <!-- <span class="required-span">* </span> -->
+ 宸ユ椂绯绘暟锛�</el-col>
+ <el-col :span="16">
+ <el-input size="small" v-model="moreInfo.manHour" clearable :disabled="moreSelects.length==0"></el-input>
+ </el-col>
+ </el-row>
+ <el-row style="width: 25%;">
+ <el-col :span="6" style="text-align: right;">
+ <!-- <span class="required-span">* </span> -->
+ 妯℃澘锛�</el-col>
+ <el-col :span="16">
+ <el-select v-model="moreInfo.templateId" size="small" filterable placeholder="妯℃澘" style="width: 100%;" :disabled="moreSelects.length==0">
+ <el-option v-for="(a, ai) in templateList" :key="ai" :label="a.name" :value="a.id"></el-option>
+ </el-select>
+ </el-col>
+ </el-row>
+ <el-row style="width: 50%;">
+ <el-col :span="23" style="display: flex;align-items: center;justify-content: end;">
+ <el-button type="primary" size="small" @click="sectionUp(moreSelects)">璁剧疆鍖洪棿</el-button>
+ <el-button @click="moreEdit = false" size="small">鍙� 娑�</el-button>
+ <el-button type="primary" @click="subMoreEdit" :loading="moreEditLoad" size="small">淇� 瀛�</el-button>
+ </el-col>
+ </el-row>
+ </div>
+ </div>
+ <div style="flex: 1;overflow-y: auto;" v-loading="productTableLoading0">
+ <el-table :data="productList0" ref="productTable0" style="width: 100%;" height="94%" tooltip-effect="dark"
+ stripe
+ :fit="true" border
+ @select-all="handleSelectAll0"
+ @select="handleSelectionChange0"
+ header-row-class-name="header-class"
+ :row-key="row=>row.id"
+ >
+ <el-table-column type="selection" width="50" >
+ </el-table-column>
+ <el-table-column prop="model" label="鍨嬪彿" min-width="100" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="inspectionItem" label="妫�楠岄」" min-width="140" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="inspectionItemSubclass" label="妫�楠岄」瀛愰」" min-width="140"
+ show-overflow-tooltip></el-table-column>
+ <el-table-column prop="sonLaboratory" label="瀛愬疄楠屽" width="130" show-overflow-tooltip :filters="filters"
+ :filter-method="filterHandler"></el-table-column>
+ <el-table-column prop="ask" label="瑕佹眰鍊�" min-width="200px"></el-table-column>
+ <el-table-column prop="tell" label="瑕佹眰鎻忚堪" min-width="220px"></el-table-column>
+ <el-table-column prop="method" label="璇曢獙鏂规硶" width="200"></el-table-column>
+ <el-table-column prop="unit" label="璁¢噺鍗曚綅" width="100" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="price" label="鍗曚环(鍏�)" width="120"></el-table-column>
+ <el-table-column prop="manHour" label="宸ユ椂绯绘暟" width="120"></el-table-column>
+ <el-table-column prop="manHourGroup" label="宸ユ椂鍒嗙粍" width="100" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="templateId" label="妯℃澘" width="200">
+ <template slot-scope="scope">
+ {{ templateList.find(item => item.id == scope.row.templateId)?templateList.find(item => item.id == scope.row.templateId).name:'' }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="section" label="鍖洪棿" width="120" show-overflow-tooltip></el-table-column>
+ </el-table>
+ <el-pagination
+ style="position: absolute;right: 16px;bottom: 4px;"
+ @current-change="handleCurrentChange0"
+ :current-page="currentPage0"
+ layout="total, prev, pager, next, jumper"
+ :page-size="50"
+ :total="total0">
+ </el-pagination>
+ </div>
+ </div>
+ </el-dialog>
+ <!-- <el-dialog title="鏂板鏍囧噯" :visible.sync="addStandardDia" width="400px">
<div class="body">
<el-row style="line-height: 50px;">
<el-col :span="6" style="text-align: right;">
@@ -290,8 +447,8 @@
<el-button @click="addStandardDia = false">鍙� 娑�</el-button>
<el-button type="primary" @click="addStandardMethodList" :loading="addLoad2">纭� 瀹�</el-button>
</span>
- </el-dialog>
- <el-dialog title="鏂板椤圭洰" :visible.sync="addProductDia" width="70%">
+ </el-dialog> -->
+ <!-- <el-dialog title="鏂板椤圭洰" :visible.sync="addProductDia" width="70%">
<div class="body" style="height: 60vh;" v-if="addProductDia">
<ValueTable ref="ValueTable" :url="$api.capacityScope.selectItemParameterList" :componentData="componentData" />
</div>
@@ -299,7 +456,7 @@
<el-button @click="addProductDia = false">鍙� 娑�</el-button>
<el-button type="primary" @click="addStandardProductDo" :loading="addLoad3">纭� 瀹�</el-button>
</span>
- </el-dialog>
+ </el-dialog> -->
<el-dialog title="鍖洪棿璁剧疆" :visible.sync="sectionUpDia" width="70%">
<div class="body" style="padding: 5px 0;">
<el-table :data="sectionList" border style="width: 100%" height="350px">
@@ -428,7 +585,44 @@
sectionLoad: false,
sectionRow: null,
sectionList: [],
- templateList: []
+ templateList: [],
+ total:0,
+ currentPage:1,
+ standardId: 0,
+ moreEdit:false,
+ moreEditLoad:false,
+ moreSelects:[],
+ total0:0,
+ currentPage0:1,
+ productList0: [],
+ moreInfo:{
+ ask:'',
+ tell:'',
+ methodS:'',
+ price:'',
+ manHour:'',
+ templateId:''
+ },
+ methodList:[],
+ productTableLoading0:false
+ }
+ },
+ watch: {
+ moreEdit(val) {
+ if(!val){
+ this.$refs.productTable0.clearSelection()
+ this.moreSelects = []
+ this.currentPage0 = 1;
+ this.productList0 = []
+ this.moreInfo = {
+ ask:'',
+ tell:'',
+ methodS:'',
+ price:'',
+ manHour:'',
+ templateId:''
+ }
+ }
}
},
mounted() {
@@ -459,6 +653,8 @@
this.upIndex++
},
handleNodeClick(val, node, el) { //鏍戠殑鍊�
+ this.total = 0
+ this.currentPage = 1
this.selectTree = ''
this.getNodeParent(node)
this.selectTree = this.selectTree.replace(' - ', '')
@@ -907,16 +1103,19 @@
},
rowClick(row, column, event) {
this.tableLoad2 = true
+ this.standardId = row.id
this.$axios.post(this.$api.standardTree.selectStandardProductListByMethodId, {
id: row.id,
- tree: this.selectTree
+ tree: this.selectTree,
+ page: this.currentPage
}).then(res => {
- this.productList = res.data
+ this.productList = res.data.productList
+ this.total = res.data.total
setTimeout(() => {
this.productList.forEach(a => {
if (a.state == 1) this.toggleSelection(a)
})
- }, 300)
+ }, 200)
this.tableLoad2 = false
})
},
@@ -955,13 +1154,13 @@
},
handleAll(e) {
if (e.length > 0) {
- this.productList.map(m => {
+ this.productList = this.productList.map(m => {
m.state = 0
this.upProductSelect(null, m)
return m
})
} else {
- this.productList.map(m => {
+ this.productList = this.productList.map(m => {
m.state = 1
this.upProductSelect(null, m)
return m
@@ -969,19 +1168,29 @@
}
},
sectionUp(row) {
- this.sectionRow = row
- this.sectionUpDia = true
- this.sectionList = []
- if (this.sectionRow.section != null && this.sectionRow.section != '') {
- JSON.parse(this.sectionRow.section).forEach((a, ai) => {
- this.sectionList.push({
- thing: a,
- ask: JSON.parse(this.sectionRow.ask)[ai],
- tell: JSON.parse(this.sectionRow.tell)[ai],
- price: JSON.parse(this.sectionRow.price)[ai],
- manHour: JSON.parse(this.sectionRow.manHour)[ai]
+ if (Array.isArray(row)) {
+ // 鍊兼槸涓�涓暟缁�
+ if(row.length === 0){
+ return this.$message.error('璇烽�夋嫨妫�楠岄」')
+ }
+ this.sectionRow = {}
+ this.sectionUpDia = true
+ } else {
+ // 鍊兼槸涓�涓璞�
+ this.sectionRow = row
+ this.sectionUpDia = true
+ this.sectionList = []
+ if (this.sectionRow.section != null && this.sectionRow.section != '') {
+ JSON.parse(this.sectionRow.section).forEach((a, ai) => {
+ this.sectionList.push({
+ thing: a,
+ ask: JSON.parse(this.sectionRow.ask)[ai],
+ tell: JSON.parse(this.sectionRow.tell)[ai],
+ price: JSON.parse(this.sectionRow.price)[ai],
+ manHour: JSON.parse(this.sectionRow.manHour)[ai]
+ })
})
- })
+ }
}
},
sectionLoadAdd() {
@@ -1013,18 +1222,42 @@
this.sectionRow.manHour = JSON.stringify(manHourList)
}
this.sectionLoad = true
- this.$axios.post(this.$api.standardTree.upStandardProductList, {
- id: this.sectionRow.id,
- section: this.sectionRow.section,
- ask: this.sectionRow.ask,
- tell: this.sectionRow.tell,
- price: this.sectionRow.price,
- manHour: this.sectionRow.manHour
- }, {
- headers: {
- 'Content-Type': 'application/json'
+ if(this.moreSelects.length === 0){
+ this.$axios.post(this.$api.standardTree.upStandardProductList, {
+ id: this.sectionRow.id,
+ section: this.sectionRow.section,
+ ask: this.sectionRow.ask,
+ tell: this.sectionRow.tell,
+ price: this.sectionRow.price,
+ manHour: this.sectionRow.manHour
+ }, {
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ }).then(res => {
+ this.sectionLoad = false
+ if (res.code == 201) {
+ this.$message.error('鏈繚瀛�')
+ return
+ }
+ this.$message.success('宸蹭繚瀛�')
+ this.sectionUpDia = false
+ })
+ }else{
+ this.$axios.post(this.$api.standardTree.upStandardProducts, {
+ ids:this.moreSelects.map(a=>a.id),
+ standardProductList:{
+ section: this.sectionRow.section,
+ ask: this.sectionRow.ask,
+ tell: this.sectionRow.tell,
+ price: this.sectionRow.price,
+ manHour: this.sectionRow.manHour
}
- }).then(res => {
+ }, {
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ }).then(res => {
this.sectionLoad = false
if (res.code == 201) {
this.$message.error('鏈繚瀛�')
@@ -1032,13 +1265,128 @@
}
this.$message.success('宸蹭繚瀛�')
this.sectionUpDia = false
+ this.currentPage0 = 1;
+ this.getList()
})
+ }
},
getStandardTemplate() {
this.$axios.get(this.$api.StandardTemplate.getStandardTemplate).then(res => {
this.templateList = res.data
})
},
+ handleCurrentChange(val) {
+ this.currentPage = val;
+ this.tableLoad2 = true
+ this.$axios.post(this.$api.standardTree.selectStandardProductListByMethodId, {
+ id: this.standardId,
+ tree: this.selectTree,
+ page: val
+ }).then(res => {
+ this.productList = res.data.productList
+ setTimeout(() => {
+ this.productList.forEach(a => {
+ if (a.state == 1) this.toggleSelection(a)
+ })
+ }, 200)
+ this.tableLoad2 = false
+ })
+ },
+ async handleMore(){
+ if(!this.standardId&&this.standardId!=0){
+ return this.$message.error('璇烽�夋嫨瀹為獙瀹ゃ�佹牱鍝�')
+ }
+ await this.getList()
+ this.selectStandardMethods()
+ this.moreEdit = true
+ },
+ selectStandardMethods() {
+ this.$axios.get(this.$api.standardMethod.selectStandardMethods).then(res => {
+ let data = []
+ res.data.forEach(a => {
+ data.push({
+ label: a.code,
+ value: a.code
+ })
+ })
+ this.methodList = data
+ })
+ },
+ subMoreEdit(){
+ if(this.moreSelects.length===0){
+ return this.$message.error('璇烽�夋嫨妫�楠岄」')
+ }
+ this.moreEditLoad = true
+ this.$axios.post(this.$api.standardTree.upStandardProducts, {
+ ids:this.moreSelects.map(a=>a.id),
+ standardProductList:this.moreInfo
+ }, {
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ }).then(res => {
+ this.moreEditLoad = false
+ if (res.code == 201) {
+ this.$message.error('鏈繚瀛�')
+ return
+ }
+ this.$message.success('宸蹭繚瀛�')
+ this.currentPage0 = 1;
+ this.getList()
+ // this.moreInfo = {
+ // ask:'',
+ // tell:'',
+ // methodS:'',
+ // price:'',
+ // manHour:'',
+ // templateId:''
+ // }
+ })
+ },
+ handleSelectAll0(rows){
+ if(rows.length){
+ rows.forEach(a=>{
+ if(!this.moreSelects.find(b=>a.id===b.id)){
+ this.moreSelects.push(a)
+ }
+ })
+ }else{
+ this.productList0.forEach(a=>{
+ this.moreSelects = this.moreSelects.filter(b=>b.id!=a.id )
+ })
+ }
+ },
+ handleSelectionChange0(val,row){
+ if(this.moreSelects.find(a=>a.id===row.id)){
+ this.moreSelects = this.moreSelects.filter(a=>a.id!=row.id)
+ }else{
+ this.moreSelects.push(row)
+ }
+ },
+ getList(){
+ this.productTableLoading0 = true
+ this.$axios.post(this.$api.standardTree.selectStandardProductListByMethodId, {
+ id: this.standardId,
+ tree: this.selectTree,
+ page: this.currentPage0
+ }).then(res => {
+ this.productList0 = res.data.productList
+ this.total0 = res.data.total
+ this.productTableLoading0 = false
+ this.$nextTick(()=>{
+ this.productList0.forEach((a,i) => {
+ if(this.moreSelects.find(b=>a.id==b.id)){
+ // console.log(111111111,a)
+ this.$refs.productTable0.toggleRowSelection(this.productList0[i],true)
+ }
+ })
+ })
+ })
+ },
+ handleCurrentChange0(e){
+ this.currentPage0 = e;
+ this.getList()
+ }
}
}
</script>
diff --git a/src/components/view/b3-classes.vue b/src/components/view/b3-classes.vue
index 0417519..e4fc53a 100644
--- a/src/components/view/b3-classes.vue
+++ b/src/components/view/b3-classes.vue
@@ -44,12 +44,12 @@
<el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
</div>
<div class="search_thing btns" style="padding-left: 30px;">
- <el-button size="small" type="primary" v-if="downPower">瀵� 鍑�</el-button>
+ <el-button size="small" type="primary" v-if="downPower" @click="handleDown" :loading="downLoading">瀵� 鍑�</el-button>
<el-button size="small" type="primary" @click="schedulingVisible = true" v-if="addPower">鎺� 鐝�</el-button>
</div>
</div>
<div class="center" v-loading="pageLoading">
- <scroll-pagination @load="init" :finishLoding="finishLoding" v-show="query.month&&list.length>0" style="height: 100%;" :key="'123'">
+ <scroll-pagination @load="init" :finishLoding="finishLoding" v-show="query.month&&list.length>0" style="height: 100%;" :key="'123'" :list="list">
<div class="clearfix">
<div class="fixed-left">
<div class="content-title" style="padding-left: 16px;box-sizing: border-box;">
@@ -87,7 +87,7 @@
<!-- <div class="work-box-left">
<span>{{ getShiftByDic(m.shift) }}</span>
</div> -->
- <el-dropdown trigger="click" placement="bottom" @command="e=>handleCommand(e,m)" :disabled="!downPower">
+ <el-dropdown trigger="click" placement="bottom" @command="e=>handleCommand(e,m)" :disabled="!upPower">
<!-- <i class="el-icon-arrow-down el-icon--right" style="font-size: 20px;color: #fff;cursor: pointer;"></i> -->
<span style="cursor: pointer;" :style="`opacity: ${getShiftByDic(m.shift)=='鏃�'?0:1};`">{{ getShiftByDic(m.shift) }}</span>
<el-dropdown-menu slot="dropdown">
@@ -101,7 +101,7 @@
</div>
</div>
</scroll-pagination>
- <scroll-pagination @load="initYear" :finishLoding="finishLoding" v-show="!query.month&&yearList.length>0" style="width: 100%;" :key="'111'">
+ <scroll-pagination @load="initYear" :finishLoding="finishLoding" v-show="!query.month&&yearList.length>0" style="width: 100%;" :key="'111'" :list="yearList">
<div class="clearfix year-table">
<div class="fixed-left">
<div class="content-title" style="padding-left: 16px;box-sizing: border-box;">
@@ -286,7 +286,9 @@
pageLoading: false, // 缁勪欢loading鐨勫睍绀�,榛樿涓簍rue
finishLoding: false, // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
monthList:[],
- yearList:[]
+ yearList:[],
+ downLoading:false,
+ keyMap:{},
}
},
watch: {
@@ -331,6 +333,7 @@
refresh(){
this.list = [];
this.yearList = []
+ this.keyMap = {};
this.currentPage = 1
this.query = {
userName:'',
@@ -345,6 +348,7 @@
}
},
refreshTable(){
+ this.keyMap = {};
this.currentPage = 1
if(this.query.month){
this.list = [];
@@ -355,6 +359,14 @@
}
},
init(){
+ const key = `_${this.currentPage}`
+ const value = this.keyMap[key]
+ // 濡傛灉value瀛樺湪锛岃〃绀虹紦瀛樻湁鍊硷紝閭d箞闃绘璇锋眰
+ if(value) {
+ return
+ }
+ // value涓嶅瓨鍦紝琛ㄧず绗竴娆¤姹�,璁剧疆鍗犱綅
+ this.keyMap[key] = 'temp'
if(this.currentPage==1){
this.pageLoading = true
}
@@ -405,6 +417,14 @@
})
},
initYear(){
+ const key = `_${this.currentPage}`
+ const value = this.keyMap[key]
+ // 濡傛灉value瀛樺湪锛岃〃绀虹紦瀛樻湁鍊硷紝閭d箞闃绘璇锋眰
+ if(value) {
+ return
+ }
+ // value涓嶅瓨鍦紝琛ㄧず绗竴娆¤姹�,璁剧疆鍗犱綅
+ this.keyMap[key] = 'temp'
// pageYear
if(this.currentPage==1){
this.pageLoading = true
@@ -516,6 +536,40 @@
this.refresh()
})
},
+ handleDown(){
+ let year = this.query.year.getFullYear()
+ let time = '';
+ if(this.query.month){
+ let month = this.query.month>9?this.query.month:'0'+this.query.month
+ time = year+'-'+month+'-01 00:00:00'
+ }else{
+ time = year+'-01-01 00:00:00'
+ }
+ this.downLoading = true
+ this.$axios.get(this.$api.performanceShift.export+`?time=${time}&userName=${this.query.userName}&laboratory=${this.query.laboratory}&isMonth=${this.query.month?true:false}`,{responseType: 'blob'}).then(res => {
+ this.$message.success('涓嬭浇鎴愬姛')
+ this.downLoading = false
+ const blob = new Blob([res], {
+ type: 'application/force-download'
+ })
+ let fileName="";
+ if(this.query.month){
+ fileName = year +'-'+this.query.month+' 鐝淇℃伅'
+ }else{
+ fileName = year+' 鐝姹囨��'
+ }
+ const filename = decodeURI(fileName+'.xlsx')
+ // 鍒涘缓涓�涓秴閾炬帴锛屽皢鏂囦欢娴佽祴杩涘幓锛岀劧鍚庡疄鐜拌繖涓秴閾炬帴鐨勫崟鍑讳簨浠�
+ const elink = document.createElement('a')
+ elink.download = filename
+ elink.style.display = 'none'
+ elink.href = URL.createObjectURL(blob)
+ document.body.appendChild(elink)
+ elink.click()
+ URL.revokeObjectURL(elink.href) // 閲婃斁URL 瀵硅薄
+ document.body.removeChild(elink)
+ })
+ },
selectEnumByCategory() {
this.$axios.post(this.$api.enums.selectEnumByCategory, {
category: "鐝绫诲瀷"
diff --git a/src/components/view/index-index.vue b/src/components/view/index-index.vue
index d74400e..8a8f1cb 100644
--- a/src/components/view/index-index.vue
+++ b/src/components/view/index-index.vue
@@ -241,7 +241,31 @@
text-align: left;
margin-bottom: 10px;
}
-
+ >>>.el-calendar-day span{
+ display: inline-block;
+ width: 30px;
+ height: 30px;
+ line-height: 30px;
+ text-align: center;
+ border-radius: 4px;
+ }
+ >>>.is-selected{
+ background: transparent !important;
+ }
+ >>>.is-selected .el-calendar-day{
+ background: transparent !important;
+ }
+ >>>.is-selected .el-calendar-day span{
+ background: #3A7BFA !important;
+ color: #fff !important;
+ }
+ >>>.el-calendar-day:hover{
+ background: transparent;
+ }
+ >>>.el-calendar-day span:hover{
+ background: #3A7BFA !important;
+ color: #fff !important;
+ }
</style>
<template>
@@ -280,7 +304,7 @@
<img src="../../../static/img/index-0.svg" alt="">
</div>
<div class="mun">
- <p style="font-size: 20px;">254</p>
+ <p style="font-size: 20px;">0</p>
<p style="font-size: 14px;margin-bottom: 10px;">鎴戠殑寰呭姙</p>
</div>
</div>
@@ -289,7 +313,7 @@
<img src="../../../static/img/index-1.svg" alt="">
</div>
<div class="mun">
- <p style="font-size: 20px;">254</p>
+ <p style="font-size: 20px;">0</p>
<p style="font-size: 14px;margin-bottom: 10px;">宸插姙浜嬪疁</p>
</div>
</div>
@@ -298,7 +322,7 @@
<img src="../../../static/img/index-2.svg" alt="">
</div>
<div class="mun">
- <p style="font-size: 20px;">254</p>
+ <p style="font-size: 20px;">0</p>
<p style="font-size: 14px;margin-bottom: 10px;">鍓╀綑寰呭姙</p>
</div>
</div>
@@ -307,7 +331,7 @@
<img src="../../../static/img/index-3.svg" alt="">
</div>
<div class="mun">
- <p style="font-size: 20px;">254</p>
+ <p style="font-size: 20px;">0</p>
<p style="font-size: 14px;margin-bottom: 10px;">杩戞湡浜嬪疁</p>
</div>
</div>
@@ -332,8 +356,8 @@
<span>
{{ data.day.split('-').slice(2)+'' }}
</span>
- <el-badge v-if="data.isSelected" is-dot class="item">
- </el-badge>
+ <!-- <el-badge v-if="data.isSelected" is-dot class="item">
+ </el-badge> -->
</template>
</el-calendar>
</div>
@@ -344,7 +368,7 @@
<p class="ellipsis-multiline" >{{ m.text }}</p>
</el-tooltip>
</div>
- <span style="color:rgb(153, 153, 153);font-size: 12px;text-align: center;margin: 120px 0;display: inline-block;width: 100%;" v-if="listScheduleByMe.length==0">鏆傛棤</span>
+ <span style="color:rgb(144, 147, 153);font-size: 14px;text-align: center;margin: 120px 0;display: inline-block;width: 100%;" v-if="listScheduleByMe.length==0">鏆傛棤鏁版嵁</span>
</div>
</div>
</div>
@@ -354,7 +378,7 @@
<div class="tab-item" style="cursor: pointer;" :class="{active:currentIndex==5}" @click="currentIndex=5">閫氱煡閫氬憡</div>
</div>
<div class="right-3-list" v-loading="listLoading">
- <scroll-pagination @load="getList" :finishLoding="finishLoding">
+ <scroll-pagination @load="getList" :finishLoding="finishLoding" :list="list" v-if="list.length>0">
<div class="list3-item" v-for="(m,i) in list" :key="i">
<div class="list3-item-title">
<img src="../../../static/img/index-tip.svg" alt="">
@@ -378,7 +402,7 @@
<div class="body" style="max-height: 60vh;">
<el-row>
<el-col class="search_thing" :span="22">
- <div class="search_label">鏃堕棿锛�</div>
+ <div class="search_label"><span style="color: red;margin-right: 4px;">*</span>鏃堕棿锛�</div>
<div class="search_input">
<el-date-picker
v-model="query.time"
@@ -390,9 +414,10 @@
</div>
</el-col>
<el-col class="search_thing" :span="22">
- <div class="search_label">鍐呭锛�</div>
+ <div class="search_label"><span style="color: red;margin-right: 4px;">*</span>鍐呭锛�</div>
<div class="search_input">
- <el-input v-model="query.text" size="small" placeholder="璇疯緭鍏ュ唴瀹�"></el-input>
+ <el-input v-model="query.text" type="textarea"
+ :rows="2" size="small" placeholder="璇疯緭鍏ュ唴瀹�"></el-input>
</div>
</el-col>
</el-row>
@@ -439,7 +464,9 @@
pageSize: 8, // 涓�椤�7鏉�
total: null,
listLoading: true, // 缁勪欢loading鐨勫睍绀�,榛樿涓簍rue
- finishLoding: false // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+ finishLoding: false, // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+ timer:null,
+ keyMap:{},
}
},
watch:{
@@ -447,6 +474,7 @@
this.getScheduleByMe()
},
currentIndex(){
+ this.keyMap = {}
this.currentPage = 1;
this.list = [];
this.getList();
@@ -458,15 +486,33 @@
setInterval(() => {
this.nowTime()
}, 1000)
- this.init();
this.weekdays = this.getWeekdaysForNextWeek()
- this.getScheduleByMe()
+ this.init();
this.currentPage = 1;
+ this.keyMap = {}
this.list = [];
this.getList();
+ this.getScheduleByMe()
+ this.timer&&clearInterval(this.timer)
+ this.timer = setInterval(() => {
+ this.init();
+ this.currentPage = 1;
+ this.keyMap = {}
+ this.list = [];
+ this.getList();
+ this.getScheduleByMe()
+ },1000*60*10)
},
methods: {
getList(){
+ const key = `_${this.currentPage}`
+ const value = this.keyMap[key]
+ // 濡傛灉value瀛樺湪锛岃〃绀虹紦瀛樻湁鍊硷紝閭d箞闃绘璇锋眰
+ if(value) {
+ return
+ }
+ // value涓嶅瓨鍦紝琛ㄧず绗竴娆¤姹�,璁剧疆鍗犱綅
+ this.keyMap[key] = 'temp'
if(this.currentPage==1){
this.listLoading = true
}
@@ -623,10 +669,11 @@
let weekdays = [];
for (let i = 0; i < 7; i++) {
let date = new Date();
- date.setDate(date.getDate() + i); // 浠婂ぉ涔嬪悗鐨勬棩瀛�
+ date.setDate(date.getDate() - i); // 浠婂ぉ涔嬪悗鐨勬棩瀛�
let day = date.getDay(); // 0-6 浠h〃鏄熸湡鏃ュ埌鏄熸湡鍏�
weekdays.push(day);
}
+ weekdays.reverse()
weekdays = weekdays.map(m=>{
let day =''
switch (m) {
@@ -691,5 +738,8 @@
})
},
},
+ deactivated(){
+ this.timer&&clearInterval(this.timer)
+ }
}
</script>
diff --git a/src/components/view/notice-detail.vue b/src/components/view/notice-detail.vue
index 0c67cb0..b1fd617 100644
--- a/src/components/view/notice-detail.vue
+++ b/src/components/view/notice-detail.vue
@@ -1,7 +1,7 @@
<template>
<div class="notice-detail-page">
<div class="notice-detail-head">
- <h4 style="margin-bottom: 16px;">{{ noticeInfo.theme }} <el-tag style="margin-left: 10px;" :type="options.find(m=>m.value==noticeInfo.messageType).type" v-if="options.find(m=>m.value==noticeInfo.messageType)">{{ options.find(m=>m.value==noticeInfo.messageType).label }}</el-tag></h4>
+ <h4 style="margin-bottom: 16px;" v-if="noticeInfo.theme">{{ noticeInfo.theme }} <el-tag style="margin-left: 10px;" :type="options.find(m=>m.value==noticeInfo.messageType).type" v-if="options.find(m=>m.value==noticeInfo.messageType)">{{ options.find(m=>m.value==noticeInfo.messageType).label }}</el-tag></h4>
<p style="font-size: 12px;color: #999;margin-bottom: 20px;">
<!-- <span>娑堟伅绫诲瀷锛氬鎵� </span> -->
<span>鍙戦�佷汉锛歿{ noticeInfo.createUser }} </span>
@@ -41,15 +41,11 @@
options:[]
}
},
- created(){
- this.noticeInfo = JSON.parse(sessionStorage.getItem("noticeInfo"));
- },
mounted(){
- this.noticeInfo = JSON.parse(sessionStorage.getItem("noticeInfo"));
+ this.noticeInfo = JSON.parse(localStorage.getItem("noticeInfo"));
this.$bus.$on("change", (msg) => {
this.noticeInfo = JSON.parse(msg);
- console.log(this.noticeInfo);
- sessionStorage.setItem("noticeInfo", msg);
+ localStorage.setItem("noticeInfo", msg);
});
this.getTypeDicts()
},
@@ -69,7 +65,11 @@
<style scoped>
.notice-detail-page{
height: calc(100% - 30px);
+ overflow-y: auto;
padding: 16px 0;
+}
+.notice-detail-page::-webkit-scrollbar {
+ width: 0;
}
.notice-detail-head{
background: #fff;
@@ -83,9 +83,9 @@
box-sizing: border-box;
padding: 8px 20px 20px;
background: rgba(0,0,0, 0.03);
- box-shadow: 0 0 10px 10px #fff;
+ /* box-shadow: 0 0 10px 10px #fff; */
border-radius: 4px;
- height: calc(100% - 192px - 22px);
+ min-height: calc(100% - 192px - 22px);
}
.notice-detail-head-content div{
border-radius: 8px;
@@ -98,6 +98,6 @@
}
.notice-content{
- height: 100%;
+ height: 600px;
}
</style>
diff --git a/src/components/view/person-manage.vue b/src/components/view/person-manage.vue
index 3ed6d9c..62b7845 100644
--- a/src/components/view/person-manage.vue
+++ b/src/components/view/person-manage.vue
@@ -1,42 +1,83 @@
<style scoped>
- .title {
- height: 60px;
- line-height: 60px;
- }
+ .person_manage {
+ padding: 20px 0;
+ display: flex;
+ }
- .search {
- background-color: #fff;
- height: 80px;
- display: flex;
- align-items: center;
- }
+ .left {
+ width: 270px;
+ height: calc(100% - 40px);
+ background-color: white;
+ padding: 15px;
+ }
- .search_thing {
- width: 350px;
- display: flex;
- align-items: center;
- }
+ .el-tree {
+ height: calc(100% - 37px);
+ overflow-y: auto;
+ }
- .search_label {
- width: 110px;
- font-size: 14px;
- text-align: right;
- }
+ .custom-tree-node {
+ width: 100%;
+ line-height: 32px;
+ }
- .search_input {
- width: calc(100% - 110px);
- }
+ .custom-tree-node .el-icon-delete {
+ color: #3A7BFA;
+ opacity: 0;
+ font-size: 18px;
+ }
- .table {
- margin-top: 10px;
- background-color: #fff;
- width: calc(100% - 40px);
- height: calc(100% - 60px - 80px - 10px - 40px);
- padding: 20px;
- }
+ .custom-tree-node:hover .el-icon-delete {
+ opacity: 1;
+ }
+
+ .node_i {
+ color: orange;
+ font-size: 18px;
+ }
+
+ .right {
+ margin-left: 5px;
+ width: calc(100% - 305px);
+ height: calc(100% - 40px);
+ }
+
+ .title {
+ height: 60px;
+ line-height: 60px;
+ }
+
+ .search {
+ background-color: #fff;
+ height: 60px;
+ display: flex;
+ align-items: center;
+ }
+
+ .search_thing {
+ width: 250px;
+ display: flex;
+ align-items: center;
+ }
+
+ .search_label {
+ width: 90px;
+ font-size: 14px;
+ text-align: right;
+ }
+
+ .search_input {
+ width: calc(100% - 90px);
+ }
+
+ .table {
+ margin-top: 4px;
+ background-color: #fff;
+ height: calc(100% - 44px);
+ }
</style>
<style>
- .el-upload--text{
+ .el-upload--text {
width: 100%;
height: 100%;
display: flex;
@@ -44,109 +85,227 @@
justify-content: center;
}
</style>
+<style>
+ .person_manage .el-tree-node__content {
+ height: 32px;
+ font-size: 14px;
+ border-radius: 2px;
+ }
+ .person_manage .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
+ color: #3A7BFA;
+ }
+
+ .person_manage .has-gutter .el-table__cell .cell {
+ line-height: 34px;
+ background-color: #f8f8f8;
+ }
+
+ .person_manage .has-gutter .el-table__cell {
+ background-color: #fafafa !important;
+ }
+
+ .person_manage .el-table__row .cell {
+ font-size: 14px;
+ }
+
+ .person_manage .el-table .warning-row .cell {
+ color: #bababa;
+ }
+</style>
<template>
- <div class="person_manage">
- <div>
- <el-row class="title">
- <el-col :span="12" style="padding-left: 20px;">鐢ㄦ埛绠$悊</el-col>
- <el-col :span="12" style="text-align: right;">
- <el-button size="medium" type="primary" @click="opeaAdd" v-if="addPower">鏂板鐢ㄦ埛</el-button>
- </el-col>
- </el-row>
- </div>
- <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.name" @keyup.enter.native="refreshTable()"></el-input></div>
- </div>
- <div class="search_thing">
- <div class="search_label">璐﹀彿鐘舵�侊細</div>
- <div class="search_input">
- <el-select size="small" v-model="componentData.entity.state" style="width: 100%;">
- <el-option label="鍏ㄩ儴" :value="null"></el-option>
- <el-option label="鍚敤" :value="1"></el-option>
- <el-option label="鍋滅敤" :value="0"></el-option>
- </el-select>
- </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.company" @keyup.enter.native="refreshTable()"></el-input>
- </div>
- </div>
- <div class="search_thing" style="padding-left: 30px;">
- <el-button size="small" @click="refresh()">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
- </div>
- </div>
- <div class="table">
- <ValueTable ref="ValueTable" :url="$api.user.selectUserList" :upUrl="$api.user.updateUser" :componentData="componentData" :key="upIndex" @upUser="upUser"/>
- </div>
- </div>
+ <div class="person_manage">
+ <div class="left">
+ <el-row>
+ <el-col :span="20">
+ <el-input placeholder="杈撳叆鍏抽敭瀛楄繘琛屾悳绱�" suffix-icon="el-icon-search" v-model="search" size="small"
+ style="margin-bottom: 5px;" clearable @blur="searchFilter" @clear="searchFilter"
+ @keyup.enter.native="searchFilter()"></el-input>
+ </el-col>
+ <el-col :span="4" style="text-align: center;line-height: 30px;" v-if="addPower">
+ <el-button type="primary" icon="el-icon-plus" size="mini" circle @click="handleAdd"></el-button>
+ </el-col>
+ </el-row>
+ <el-tree :data="list" ref="tree" :props="{ children: 'children', label: 'name' }" node-key="id"
+ :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen"
+ @node-collapse="nodeClose" v-loading="treeLoad" :expand-on-click-node="false"
+ :default-expanded-keys="expandedKeys" :default-checked-keys="[1]">
+ <div class="custom-tree-node" slot-scope="{ node, data }">
+ <el-row style="width: 100%;">
+ <el-col :span="21" :class="{sort:node.level>3}">
+ <span><i
+ :class="`node_i ${data.children != undefined&&data.children.length>0 ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i>
+ {{ data.name }}</span>
+ </el-col>
+ <el-col :span="2" style="text-align: right;" v-if="delStandardTree&&node.level>1">
+ <el-button type="text" size="mini" @click.stop="remove(node, data)">
+ <i class="el-icon-delete"></i>
+ </el-button>
+ </el-col>
+ </el-row>
+ </div>
+ </el-tree>
+ </div>
+ <div class="right">
+ <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.name" @keyup.enter.native="refreshTable()"></el-input></div>
+ </div>
+ <div class="search_thing">
+ <div class="search_label">璐﹀彿鐘舵�侊細</div>
+ <div class="search_input">
+ <el-select size="small" v-model="componentData.entity.state" style="width: 100%;">
+ <el-option label="鍏ㄩ儴" :value="null"></el-option>
+ <el-option label="鍚敤" :value="1"></el-option>
+ <el-option label="鍋滅敤" :value="0"></el-option>
+ </el-select>
+ </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.company"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </div>
+ </div>
+ <div class="search_thing" style="padding-left: 30px;">
+ <el-button size="small" @click="refresh()">閲� 缃�</el-button>
+ <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
+ </div>
+ <div class="search_thing">
+ <el-button size="small" type="primary" @click="openthirdParty">鑾峰彇涓夋柟浜哄憳</el-button>
+ <el-button size="small" type="primary" @click="opeaAdd" v-if="addPower">鏂板鐢ㄦ埛</el-button>
+ </div>
+ </div>
+ <div class="table">
+ <ValueTable ref="ValueTable" :url="$api.user.selectUserList" :upUrl="$api.user.updateUser"
+ :componentData="componentData" :key="upIndex" />
+ </div>
+ </div>
+ <el-dialog title="鏋舵瀯鏂板" :visible.sync="addDia" width="400px">
+ <div class="body">
+ <el-row style="line-height: 50px;">
+ <el-col :span="6" style="text-align: right;">
+ <span class="required-span">* </span>鏋舵瀯鍚嶇О锛�
+ </el-col>
+ <el-col :span="16" :offset="1">
+ <el-input v-model="addOb.name" placeholder="璇疯緭鍏ユ灦鏋勫悕绉�" clearable size="small"></el-input>
+ </el-col>
+ </el-row>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="addDia = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="addStandardTree" :loading="addLoad">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <el-dialog title="鑾峰彇浜轰簨绯荤粺浜哄憳淇℃伅" :visible.sync="addthirdParty" width="70%">
+ <div class="body">
+ <el-row>
+ <el-col :span="9" style="height: 70vh;overflow: hidden;">
+ <el-input placeholder="杈撳叆鍏抽敭瀛楄繘琛岃繃婊�" v-model="search2" size="small" style="width: 90%;padding: 0 5% 10px 5%;"
+ clearable @blur="searchFilter2" @clear="searchFilter2" @keyup.enter.native="searchFilter2()">
+ </el-input>
+ <el-tree :data="datathirdParty" node-key="id" :props="defaultProps" @node-click="nodeClick2"
+ style="height: calc(100% - 42px);" :filter-node-method="filterNode2" ref="tree2" highlight-current>
+ </el-tree>
+ </el-col>
+ <el-col :span="15" style="height: 70vh;padding-left: 8px;">
+ <el-table height="70vh" border stripe :data="personList" v-loading="personLoad" ref="personTable"
+ @selection-change="handleSelectionChange">
+ <el-table-column type="selection" width="50">
+ </el-table-column>
+ <el-table-column prop="employeeID" label="鍛樺伐鍙�">
+ </el-table-column>
+ <el-table-column prop="name" label="鍛樺伐濮撳悕">
+ </el-table-column>
+ <el-table-column prop="isLive" label="宸插瓨鍦�" width="80" align="center">
+ <template slot-scope="scope">
+ <el-tag type="success" effect="dark" v-if="scope.row.isLive === 1">鈭�</el-tag>
+ </template>
+ </el-table-column>
+ </el-table>
+ </el-col>
+ </el-row>
+ </div>
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="addthirdParty = false" size="mini">鍙� 娑�</el-button>
+ <el-button type="primary" @click="addUser2" :loading="addLoad" size="mini">纭� 瀹�</el-button>
+ </div>
+ </el-dialog>
+ </div>
</template>
<script>
- import ValueTable from '../tool/value-table.vue'
- export default {
- components: {
- ValueTable
- },
- data() {
- return {
- componentData: {
- entity: {
- name: null,
- state: null,
- company: null,
- orderBy:{
- field: 'id',
- order: 'asc'
- }
- },
+ import {
+ compileToFunctions
+ } from 'vue-template-compiler'
+ import ValueTable from '../tool/value-table.vue'
+ export default {
+ components: {
+ ValueTable
+ },
+ data() {
+ return {
+ datathirdParty: [],
+ defaultProps: {
+ children: 'children',
+ label: 'label'
+ },
+ addthirdParty: false,
+ componentData: {
+ entity: {
+ name: null,
+ state: null,
+ company: null,
+ departId: null,
+ orderBy: {
+ field: 'id',
+ order: 'asc'
+ }
+ },
row: 2,
- isIndex: true,
- showSelect: false,
- select: false,
- init:false,
- do: [{
- id: 'update',
- font: '缂栬緫',
- type: 'text',
- method: 'doDiy',
- field:['createUserName','updateUserName','roleName','瑙掕壊=roleId','瀵嗙爜=password']
- }],
- tagField: {
- state: {
- select: [{
- value: 1,
- type: 'success',
- label: '鍚敤'
- },{
- value: 0,
- type: 'danger',
- label: '鍋滅敤'
- }]
- }
- },
- selectField: {
- state: {
- select: [{
- value: 1,
- type: 'success',
- label: '鍚敤'
- },{
- value: 0,
- type: 'danger',
- label: '鍋滅敤'
- }]
- },
- roleId: {
- select: []
- }
- },
+ isIndex: true,
+ showSelect: false,
+ select: false,
+ init: false,
+ do: [{
+ id: 'update',
+ font: '缂栬緫',
+ type: 'text',
+ method: 'doDiy',
+ field: ['createUserName', 'updateUserName', 'roleName', '瑙掕壊=roleId', '瀵嗙爜=password']
+ }],
+ tagField: {
+ state: {
+ select: [{
+ value: 1,
+ type: 'success',
+ label: '鍚敤'
+ }, {
+ value: 0,
+ type: 'danger',
+ label: '鍋滅敤'
+ }]
+ }
+ },
+ selectField: {
+ state: {
+ select: [{
+ value: 1,
+ type: 'success',
+ label: '鍚敤'
+ }, {
+ value: 0,
+ type: 'danger',
+ label: '鍋滅敤'
+ }]
+ },
+ roleId: {
+ select: []
+ }
+ },
/* cascaderField:{
departId:{
tree:[]
@@ -158,86 +317,272 @@
checkStrictly: true
}
}, */
- requiredAdd:['account','name','state','roleId','password','nameEn','phone'],
- requiredUp:['account','name','state','roleId','nameEn','phone'],
- addUpload:['pictureUrl','signatureUrl'],
- addUploadConfig:{
- accept:'.png, .jpg, .jpeg, .gif',
- url:this.$api.deviceScope.uploadFile
+ requiredAdd: ['account', 'name', 'state', 'roleId', 'password', 'nameEn', 'phone'],
+ requiredUp: ['account', 'name', 'state', 'roleId', 'nameEn', 'phone'],
+ // disabledUp:['departId'],
+ addUpload: ['pictureUrl', 'signatureUrl'],
+ addUploadConfig: {
+ accept: '.png, .jpg, .jpeg, .gif',
+ url: this.$api.deviceScope.uploadFile
},
- },
- entityCopy: {},
- upIndex: 0,
- addDia: false,
- addPower: true
- }
- },
- mounted() {
+ },
+ entityCopy: {},
+ upIndex: 0,
+ addDia: false,
+ addPower: true,
+ delStandardTree: true,
+ addDia0: false,
+ addOb: {
+ fatherId: '',
+ name: '',
+ },
+ search: null,
+ list: [],
+ selectTree: '',
+ treeLoad: false,
+ expandedKeys: [],
+ addLoad: false,
+ personList: [],
+ treeLoad: false,
+ personLoad: false,
+ search2: '',
+ multipleSelection: []
+ }
+ },
+ mounted() {
this.selectTreeList()
- this.selectRole()
- this.entityCopy = this.HaveJson(this.componentData.entity)
- this.getPower()
- },
- methods: {
- refreshTable() {
- this.$refs['ValueTable'].selectList()
- },
- refresh() {
- this.componentData.entity = this.HaveJson(this.entityCopy)
- this.upIndex++
- },
- upUser(row){
- console.log(row);
- },
- selectRole(){
- this.$axios.get(this.$api.user.selectRoleList).then(res=>{
- var str = []
- res.data.forEach(a=>{
- str.push({
- label: a.name,
- value: a.id
- })
- })
- this.componentData.selectField.roleId.select = str
- })
- },
- opeaAdd(){
- this.$refs.ValueTable.openAddDia(this.$api.user.addUser);
- },
- selectTreeList(){
- /* this.$axios.get(this.$api.department.selectDepartment).then(res => {
+ this.selectRole()
+ this.entityCopy = this.HaveJson(this.componentData.entity)
+ this.getPower()
+ },
+ methods: {
+ openthirdParty() {
+ this.addthirdParty = true;
+ this.$axios.get(this.$api.companies.selectCompaniesList).then(res => {
+ this.datathirdParty = []
+ for (let ai = 0; ai < res.data.length; ai++) {
+ let a = res.data[ai]
+ if (a.parentCompanyId === 'ROOT') {
+ this.datathirdParty.push({
+ id: a.companyId,
+ label: a.companyName,
+ children: []
+ })
+ res.data.splice(ai, 1)
+ ai--
+ } else {
+ this.getOrganizational(a, ai, this.datathirdParty, res.data)
+ }
+ }
+ })
+ },
+ getOrganizational(a, ai, children, list) {
+ for (let bi = 0; bi < children.length; bi++) {
+ let b = children[bi]
+ if (a.parentCompanyId === b.id) {
+ b.children.push({
+ id: a.companyId,
+ label: a.companyName,
+ children: []
+ })
+ list.splice(ai, 1)
+ ai--
+ break
+ } else {
+ this.getOrganizational(a, ai, b.children, list)
+ }
+ }
+ },
+ refreshTable() {
+ this.$refs['ValueTable'].selectList()
+ },
+ refresh() {
+ this.componentData.entity = this.HaveJson(this.entityCopy)
+ // this.upIndex++
+ this.refreshTable()
+ },
+ selectRole() {
+ this.$axios.get(this.$api.user.selectRoleList).then(res => {
+ var str = []
+ res.data.forEach(a => {
+ str.push({
+ label: a.name,
+ value: a.id
+ })
+ })
+ this.componentData.selectField.roleId.select = str
+ })
+ },
+ opeaAdd() {
+ if (!this.addOb.fatherId || this.selectTree == '' || this.selectTree == '鍏ㄩ儴') {
+ this.$message.error('璇烽�夋嫨涓�涓粍缁�')
+ return
+ }
+ this.$refs.ValueTable.openAddDia(this.$api.user.addUser);
+ this.$refs['ValueTable'].upData.departId = this.selectTree
+ },
+ selectTreeList() {
+ /* this.$axios.get(this.$api.department.selectDepartment).then(res => {
this.componentData.cascaderField.departId.tree = this.handleTree(res.data[0].children)
}) */
this.$refs.ValueTable.selectList()
},
- handleTree(arr){
+ handleTree(arr) {
arr.forEach(a => {
- if(a.children.length==0){
+ if (a.children.length == 0) {
a.children = null;
- }else{
+ } else {
this.handleTree(a.children)
}
})
return arr
},
- // 鏉冮檺鍒嗛厤
- getPower(){
- let power = JSON.parse(sessionStorage.getItem('power'))
- let up = false
- let add = false
- for (var i = 0; i < power.length; i++) {
- if(power[i].menuMethod=='updateUser'){
- up = true
- }
- if(power[i].menuMethod=='addUser'){
- add = true
- }
- }
- if(!up){
- this.componentData.do.splice(0, 1)
- }
- this.addPower = add
- }
- }
- }
+ // 鏉冮檺鍒嗛厤
+ getPower() {
+ let power = JSON.parse(sessionStorage.getItem('power'))
+ let up = false
+ let add = false
+ let delStandardTree = false
+ for (var i = 0; i < power.length; i++) {
+ if (power[i].menuMethod == 'updateUser') {
+ up = true
+ }
+ if (power[i].menuMethod == 'addUser') {
+ add = true
+ }
+ if (power[i].menuMethod == 'delDepartment') {
+ delStandardTree = true
+ }
+ }
+ if (!up) {
+ this.componentData.do.splice(0, 1)
+ }
+ this.delStandardTree = delStandardTree
+ this.addPower = add
+ },
+ handleAdd() {
+ if (this.addOb.fatherId) {
+ this.addDia0 = true;
+ } else {
+ this.$message.error('璇烽�夋嫨涓�涓灦鏋勫眰绾�')
+ }
+ },
+ searchFilter() {
+ this.$refs.tree.filter(this.search)
+ },
+ searchFilter2() {
+ this.$refs.tree2.filter(this.search2)
+ },
+ filterNode(value, data) {
+ console.log(data);
+ if (!value) return true;
+ return data.name.indexOf(value) !== -1;
+ },
+ filterNode2(value, data) {
+ if (!value) return true;
+ return data.label.indexOf(value) !== -1;
+ },
+ handleNodeClick(val, node, el) { //鏍戠殑鍊�
+ this.selectTree = ''
+ this.getNodeParent(node)
+ this.selectTree = this.selectTree.replace(' - ', '')
+ let data = this.selectTree.split(' - ')
+ let data2 = ''
+ for (let index = data.length - 1; index >= 0; index--) {
+ data2 += " - " + data[index]
+ }
+ this.selectTree = data2.replace(' - ', '')
+ this.addOb.fatherId = val.id;
+ this.componentData.entity.departId = val.id;
+ this.refreshTable()
+ },
+ nodeOpen(data, node, el) {
+ $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder-opened')
+ },
+ nodeClose(data, node, el) {
+ $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder')
+ },
+ getNodeParent(val) {
+ if (val.parent != null) {
+ this.selectTree += ' - ' + val.label
+ this.getNodeParent(val.parent)
+ }
+ },
+ remove(node, data) {
+ this.$confirm("鏄惁鍒犻櫎璇ュ眰绾�", "鎻愮ず", {
+ type: "error"
+ }).then(() => {
+ this.treeLoad = true
+ this.$axios.post(this.$api.department.delDepartment, {
+ id: data.id
+ }).then(res => {
+ if (res.code == 201) return
+ this.$message.success('宸插垹闄�')
+ this.selectTreeList()
+ })
+ }).catch(e => {})
+ },
+ selectTreeList() {
+ this.treeLoad = true
+ this.$axios.get(this.$api.department.selectDepartment).then(res => {
+ this.list = res.data
+ this.list.forEach(a => {
+ a.children.forEach(b => {
+ b.children.forEach(c => {
+ this.expandedKeys.push(c.id)
+ })
+ })
+ })
+ this.treeLoad = false
+ this.componentData.entity.departId = this.list[0].id;
+ this.selectTree = '鍏ㄩ儴'
+ this.refreshTable()
+ })
+ },
+ addStandardTree() {
+ if (this.addOb.name == null || this.addOb.factory == '') {
+ this.$message.error('鏋勬灦鍚嶇О鏄繀濉」')
+ return
+ }
+ this.addLoad = true
+ this.$axios.post(this.$api.department.addDepartment, this.addOb, {
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ }).then(res => {
+ if (res.code === 201) {
+ this.addLoad = false
+ return
+ }
+ this.$message.success('娣诲姞鎴愬姛')
+ this.addDia0 = false
+ this.selectTreeList()
+ this.addLoad = false
+ this.addOb.name = ''
+ this.addOb.fatherId = ''
+ }).catch(e => {
+ this.addDia0 = false
+ this.addLoad = false
+ })
+ },
+ nodeClick2(ob, node, el) {
+ if (ob.id !== 'SC21') {
+ this.personLoad = true
+ this.$axios.post(this.$api.companies.selectSimpleList, {
+ companyId: ob.id
+ }).then(res => {
+ this.personList = res.data
+ this.personLoad = false
+ this.$refs.personTable.doLayout()
+ })
+ }
+ },
+ handleSelectionChange(val) {
+ this.multipleSelection = val;
+ console.log(this.multipleSelection);
+ },
+ addUser2(){
+ }
+ }
+ }
</script>
diff --git a/src/components/view/role-manage.vue b/src/components/view/role-manage.vue
index 28c4b8d..6b41247 100644
--- a/src/components/view/role-manage.vue
+++ b/src/components/view/role-manage.vue
@@ -96,6 +96,7 @@
<el-button type="primary" @click="saveAddData" :loading="addLoad" v-if="type!='鏌ョ湅'">纭� 瀹�</el-button>
</span>
</el-dialog>
+
</div>
</template>
diff --git a/src/view/index.vue b/src/view/index.vue
index 60b94d2..b9ff928 100644
--- a/src/view/index.vue
+++ b/src/view/index.vue
@@ -225,8 +225,8 @@
.component_view {
height: calc(100vh - 84px);
- width: calc(100% - 52px);
- padding: 0 26px;
+ width: calc(100% - 40px);
+ padding: 0 20px;
background: rgb(245, 247, 251);
}
@@ -393,7 +393,7 @@
<el-button type="primary" @click="handleEdit">纭� 瀹�</el-button>
</span>
</el-dialog>
- <notice ref="notice" />
+ <notice ref="notice" @goNoticeDetail="checkForUnreadData()" />
</div>
</template>
diff --git a/src/view/notice.vue b/src/view/notice.vue
index 4a10fef..99f4985 100644
--- a/src/view/notice.vue
+++ b/src/view/notice.vue
@@ -34,10 +34,11 @@
</el-dropdown>
</div>
<div class="notice-content" v-loading="loading">
- <scroll-pagination @load="refresh" :finishLoding="finishLoding">
+ <scroll-pagination @load="refresh" :finishLoding="finishLoding" :list="list">
<div class="notice-content-item" v-for="(m,i) in list" :key="i">
<div class="btns" v-if="m">
- <el-dropdown style="margin-right: 20px;" trigger="click" @command="e=>handleDropdown(e,m)" v-if="m.messageType==2||m.messageType==3">
+ <!-- v-if="m.messageType==2||m.messageType==3" -->
+ <el-dropdown style="margin-right: 20px;" trigger="click" @command="e=>handleDropdown(e,m)" v-if="false">
<span class="el-dropdown-link">
<span class="more" style="line-height: 26px;display: inline-block;">···</span>
</span>
@@ -124,17 +125,27 @@
pageSize: 8, // 涓�椤�7鏉�
total: null,
loading: true, // 缁勪欢loading鐨勫睍绀�,榛樿涓簍rue
- finishLoding: false // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+ finishLoding: false, // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+ keyMap:{}
}
},
mounted(){
this.getTypeDicts();
this.currentPage = 1;
+ this.keyMap = {};
this.list = [];
this.refresh();
},
methods:{
refresh(){
+ const key = `_${this.currentPage}`
+ const value = this.keyMap[key]
+ // 濡傛灉value瀛樺湪锛岃〃绀虹紦瀛樻湁鍊硷紝閭d箞闃绘璇锋眰
+ if(value) {
+ return
+ }
+ // value涓嶅瓨鍦紝琛ㄧず绗竴娆¤姹�,璁剧疆鍗犱綅
+ this.keyMap[key] = 'temp'
if(this.currentPage==1){
this.loading = true
}
@@ -179,8 +190,8 @@
},
goNoticeDetail(row){
this.$axios.put(this.$api.informationNotification.triggerModificationStatusToRead+'/'+row.id).then(res => {
- this.drawer = false;
row.num = Math.random(100);
+ localStorage.setItem("noticeInfo", JSON.stringify(row))
this.$bus.$emit("change", JSON.stringify(row));
this.$parent.addTab({
v: "娑堟伅璇︽儏",
@@ -190,9 +201,12 @@
p: "abcd"
},29);
this.list = [];
+ this.keyMap = {};
this.currentPage = 1;
this.refresh();
+ this.$emit('goNoticeDetail')
})
+ this.drawer = false;
},
handleDropdown(e,row){
switch(e){
@@ -215,6 +229,7 @@
}
this.$message.success('鍒犻櫎鎴愬姛')
this.list = [];
+ this.keyMap = {};
this.currentPage = 1;
this.refresh()
}).catch(e => {
@@ -222,40 +237,9 @@
})
}).catch(() => {})
},
- // 婊氬姩瑙﹀簳鍔犺浇
- scrollFn() {
- let clientHeight = document.documentElement.clientHeight - 18; //鍙鍖哄煙
- let scrollHeight = document.body.scrollHeight; // 婊氬姩鏂囨。楂樺害
- let scrollTop = parseInt(document.documentElement.scrollTop); // 宸叉粴鍔ㄧ殑楂樺害
- let height = 300;
- if (
- scrollTop + clientHeight >= scrollHeight - height &&
- scrollHeight != 0
- ) {
- if (!this.finishLoding&&this.currentPage*this.pageSize<this.total) {
- this.currentPage = this.currentPage + 1;
- this.refresh();
- }
- } else {
- return false;
- }
- },
- throttle(fn, wait) {
- // 灏佽鍑芥暟杩涜鑺傛祦
- var timer = null;
- return function () {
- var context = this;
- var args = arguments;
- if (!timer) {
- timer = setTimeout(function () {
- fn.apply(context, args);
- timer = null;
- }, wait);
- }
- };
- },
handleType(){
this.list = [];
+ this.keyMap = {};
this.currentPage = 1;
this.refresh();
},
@@ -270,13 +254,11 @@
}
this.$message.success('鎿嶄綔鎴愬姛')
this.list = [];
+ this.keyMap = {};
this.currentPage = 1;
this.refresh();
})
}
- },
- destroyed() {
- window.removeEventListener("scroll", this.throttle(), false);
},
}
</script>
diff --git a/static/js/menu.js b/static/js/menu.js
index 4f54acf..0fb4b37 100644
--- a/static/js/menu.js
+++ b/static/js/menu.js
@@ -13,7 +13,7 @@
{
v: "涓氬姟绠$悊",
i: "font icon-kexueyanjiuheshiyankaifa",
- p: "selectInsOrderParameter selectInsOrderPlanList pageInsReport pageInsUnPass",
+ p: "selectInsOrderParameter selectInsOrderPlanList pageInsReport costStatistics selectWarehouse",
c: [{
v: "妫�楠屼笅鍗�",
i: "font icon-erjidaohang",
@@ -50,7 +50,7 @@
{
v: "鏍囧噯闆�",
i: "font icon-biaozhunji",
- p: "",
+ p: "selectStandardTreeList selectStandardTemplatePageList",
c: [{
v: "鏍囧噯搴�",
i: "font icon-erjidaohang",
@@ -71,7 +71,7 @@
v: "宸ユ椂绠$悊",
i: "font icon-erjidaohang",
u: "b3-work-time-management",
- p: ""
+ p: "selectAuxiliaryWorkingHours"
}, {
v: "浜哄憳鑰冨嫟",
i: "font icon-erjidaohang",
@@ -101,7 +101,7 @@
v: "鐝",
i: "font icon-erjidaohang",
u: "b3-classes",
- p: ""
+ p: "performanceShiftPage performanceShiftPageYear"
}]
},
{
@@ -127,7 +127,7 @@
v: "鏍峰搧缂洪櫡鎸囨暟",
i: "font icon-erjidaohang",
u: "b4-sample-defects",
- p: ""
+ p: "selectSampleDefects"
}, {
v: "鑰楁潗缁熻",
i: "font icon-erjidaohang",
@@ -174,12 +174,12 @@
v: "瑙掕壊绠$悊",
i: "el-icon-s-tools",
u: "role-manage",
- p: ""
+ p: "selectRoleLists"
}, {
v: "鐢ㄦ埛绠$悊",
i: "el-icon-s-tools",
u: "person-manage",
- p: ""
+ p: "selectUserList"
}, {
v: "瀹㈡埛绠$悊",
i: "el-icon-s-tools",
@@ -189,7 +189,7 @@
v: "绯荤粺鏃ュ織",
i: "el-icon-s-tools",
u: "system-log",
- p: "selectSystemLogList"
+ p: ""
}, {
v: "娑堟伅璇︽儏",
i: "el-icon-s-tools",
--
Gitblit v1.9.3