From 2d517aae6a1d6e0491f6931f827253a2e38861e0 Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期三, 16 八月 2023 11:39:31 +0800
Subject: [PATCH] 所有弹窗选择设备的部门权限 设备部门管理的设备列表的权限
---
src/views/mdc/base/modules/deviceRepair/DeviceRepairListModel.vue | 110 +++++--
src/views/mdc/base/modules/HolidayManagement/HolidayManagementModalList.vue | 110 +++++--
src/views/mdc/base/modules/deviceCalendar/DeviceCalendarListModel.vue | 23 +
src/views/system/DepartList.vue | 44 ++
src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModalList.vue | 110 +++++--
src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalList.vue | 110 +++++--
src/views/mdc/base/modules/mdcPassRate/mdcPassRateModalList.vue | 110 +++++--
src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModalList.vue | 110 +++++--
8 files changed, 520 insertions(+), 207 deletions(-)
diff --git a/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModalList.vue b/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModalList.vue
index c13d1e2..86d898c 100644
--- a/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModalList.vue
+++ b/src/views/mdc/base/modules/HolidayManagement/HolidayManagementModalList.vue
@@ -1,13 +1,14 @@
+
<template>
- <a-modal :title="title" :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
+ <a-modal :title="title" width="70%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
cancelText="鍏抽棴">
<a-card :bordered="false">
<!-- 鏌ヨ鍖哄煙 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
- <a-col :md="6" :sm="6">
- <a-form-item label="閮ㄩ棬" >
+ <a-col :md="6" :sm="6" v-if="isDepartType == 0">
+ <a-form-item label="閮ㄩ棬" v-if="isDepartType == 0">
<!--<a-select v-model="queryParam.sectionPid" placeholder="璇烽�夋嫨閮ㄩ棬" :options="sectionPData" @change="initGroupOptions" />-->
<a-tree-select
v-model="value"
@@ -17,16 +18,16 @@
placeholder="璇烽�夋嫨閮ㄩ棬"
tree-default-expand-all
>
- <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">-->
- <!--Child Node1 {{ value }}-->
- <!--</span>-->
+ <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">-->
+ <!--Child Node1 {{ value }}-->
+ <!--</span>-->
</a-tree-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="6">
<a-form-item label="杞﹂棿" >
- <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨杞﹂棿" :options="sectionData"/>-->
+ <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨鍥㈤槦" :options="sectionData"/>-->
<a-tree-select
v-model="valueProduct"
style="width: 100%"
@@ -63,7 +64,7 @@
</div>
<!-- table鍖哄煙-begin -->
<div>
- <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns"
+ <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 400聽}" :columns="columns"
:dataSource="dataSource" :pagination="ipagination" :loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
@@ -75,6 +76,7 @@
</template>
<script>
+ import {mapActions} from 'vuex'
import {
ajaxGetSelectItems
} from '@/api/api'
@@ -95,7 +97,7 @@
import moment from 'moment'
export default {
- name: 'DeviceRepairListModel',
+ name: 'DeviceCalendarListModel',
mixins: [JeecgListMixin],
components: {
JDictSelectTag,
@@ -112,17 +114,30 @@
},
data() {
return {
- treeData:[],
- readOnly:true,
+ isDepartType:'',
+ /*readOnly:true,*/
title:'',
visible: false,
- disableMixinCreated: true,
- queryParam: {},
- columns: [{
- title: '璁惧缂栫爜',
- align: 'center',
- dataIndex: 'equipmentId',
- },
+ SelectedList:[],
+ treeData:[],
+ /*disableMixinCreated: true,
+ queryParam: {},*/
+ columns: [
+ {
+ title: '#',
+ dataIndex: '',
+ key: 'rowIndex',
+ width: 60,
+ align: "center",
+ customRender: function (t, r, index) {
+ return parseInt(index) + 1;
+ }
+ },{
+
+ title: '璁惧缂栫爜',
+ align: 'center',
+ dataIndex: 'equipmentId',
+ },
{
title: '璁惧鍚嶇О',
align: 'center',
@@ -131,13 +146,13 @@
{
title: '椹卞姩绫诲瀷',
align: 'center',
- dataIndex: 'driveType',
+ dataIndex: 'driveType'
},
{
title: '鏁版帶绯荤粺',
align: 'center',
- dataIndex: 'controlSystem',
- }
+ dataIndex: 'controlSystem'
+ },
],
sectionPData: [],
sectionData: [],
@@ -151,7 +166,7 @@
}
},
created() {
-
+ this.queryTreeData()
},
watch: {
value(value) {
@@ -162,18 +177,21 @@
this.queryParam.productionId = value
}
},
-
methods: {
- openPage() {
- this.visible = true
- this.onClearSelected()
- this.dataSource = [];
- this.queryParam = {
- status: this.status
- };
- this.loadData();
- this.initOptions();
- this.initGroupOptions()
+ ...mapActions(['QueryDepartTree']),
+ queryTreeData() {
+ this.QueryDepartTree().then(res => {
+ if (res.success) {
+ this.isDepartType = res.result[0].value
+ } else {
+ // this.$message.warn(res.message)
+ this.$notification.warning({
+ message:'娑堟伅',
+ description:res.message
+ });
+ }
+ }).finally(() =>{
+ })
},
onSelectChange(selectedRowKeys, selectionRows) {
// this.SelectedList.push(selectedRowKeys);
@@ -181,6 +199,29 @@
this.selectionRows = selectionRows
// this.SelectedList =[...this.SelectedList,...selectionRows];
// console.log(this.SelectedList);
+ },
+ handleTableChange(pagination, filters, sorter) {
+ // this.onClearSelected()
+ //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂
+ //TODO 绛涢��
+ if (Object.keys(sorter).length > 0) {
+ this.isorter.column = sorter.field;
+ this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
+ }
+ this.ipagination = pagination;
+ this.loadData();
+ },
+ openPage() {
+ this.visible = true
+ this.onClearSelected()
+ this.dataSource = [];
+ this.queryParam = {
+ status: this.status
+ };
+
+ this.loadData();
+ this.initOptions();
+ this.initGroupOptions()
},
loadData(arg) {
if(!this.url.list){
@@ -224,6 +265,7 @@
modalFormOk(val) {
// 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
this.loadData();
+
this.selectedRowKeys = [val.id];
},
searchQuery() {
@@ -245,6 +287,8 @@
this.close()
},
handleOk() {
+ // this.selectionRows = this.SelectedList;
+ // console.log(this.selectionRows);
this.$emit('sendSelectionRows', this.selectionRows)
this.close()
},
diff --git a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalList.vue b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalList.vue
index c13d1e2..86d898c 100644
--- a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalList.vue
+++ b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalList.vue
@@ -1,13 +1,14 @@
+
<template>
- <a-modal :title="title" :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
+ <a-modal :title="title" width="70%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
cancelText="鍏抽棴">
<a-card :bordered="false">
<!-- 鏌ヨ鍖哄煙 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
- <a-col :md="6" :sm="6">
- <a-form-item label="閮ㄩ棬" >
+ <a-col :md="6" :sm="6" v-if="isDepartType == 0">
+ <a-form-item label="閮ㄩ棬" v-if="isDepartType == 0">
<!--<a-select v-model="queryParam.sectionPid" placeholder="璇烽�夋嫨閮ㄩ棬" :options="sectionPData" @change="initGroupOptions" />-->
<a-tree-select
v-model="value"
@@ -17,16 +18,16 @@
placeholder="璇烽�夋嫨閮ㄩ棬"
tree-default-expand-all
>
- <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">-->
- <!--Child Node1 {{ value }}-->
- <!--</span>-->
+ <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">-->
+ <!--Child Node1 {{ value }}-->
+ <!--</span>-->
</a-tree-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="6">
<a-form-item label="杞﹂棿" >
- <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨杞﹂棿" :options="sectionData"/>-->
+ <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨鍥㈤槦" :options="sectionData"/>-->
<a-tree-select
v-model="valueProduct"
style="width: 100%"
@@ -63,7 +64,7 @@
</div>
<!-- table鍖哄煙-begin -->
<div>
- <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns"
+ <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 400聽}" :columns="columns"
:dataSource="dataSource" :pagination="ipagination" :loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
@@ -75,6 +76,7 @@
</template>
<script>
+ import {mapActions} from 'vuex'
import {
ajaxGetSelectItems
} from '@/api/api'
@@ -95,7 +97,7 @@
import moment from 'moment'
export default {
- name: 'DeviceRepairListModel',
+ name: 'DeviceCalendarListModel',
mixins: [JeecgListMixin],
components: {
JDictSelectTag,
@@ -112,17 +114,30 @@
},
data() {
return {
- treeData:[],
- readOnly:true,
+ isDepartType:'',
+ /*readOnly:true,*/
title:'',
visible: false,
- disableMixinCreated: true,
- queryParam: {},
- columns: [{
- title: '璁惧缂栫爜',
- align: 'center',
- dataIndex: 'equipmentId',
- },
+ SelectedList:[],
+ treeData:[],
+ /*disableMixinCreated: true,
+ queryParam: {},*/
+ columns: [
+ {
+ title: '#',
+ dataIndex: '',
+ key: 'rowIndex',
+ width: 60,
+ align: "center",
+ customRender: function (t, r, index) {
+ return parseInt(index) + 1;
+ }
+ },{
+
+ title: '璁惧缂栫爜',
+ align: 'center',
+ dataIndex: 'equipmentId',
+ },
{
title: '璁惧鍚嶇О',
align: 'center',
@@ -131,13 +146,13 @@
{
title: '椹卞姩绫诲瀷',
align: 'center',
- dataIndex: 'driveType',
+ dataIndex: 'driveType'
},
{
title: '鏁版帶绯荤粺',
align: 'center',
- dataIndex: 'controlSystem',
- }
+ dataIndex: 'controlSystem'
+ },
],
sectionPData: [],
sectionData: [],
@@ -151,7 +166,7 @@
}
},
created() {
-
+ this.queryTreeData()
},
watch: {
value(value) {
@@ -162,18 +177,21 @@
this.queryParam.productionId = value
}
},
-
methods: {
- openPage() {
- this.visible = true
- this.onClearSelected()
- this.dataSource = [];
- this.queryParam = {
- status: this.status
- };
- this.loadData();
- this.initOptions();
- this.initGroupOptions()
+ ...mapActions(['QueryDepartTree']),
+ queryTreeData() {
+ this.QueryDepartTree().then(res => {
+ if (res.success) {
+ this.isDepartType = res.result[0].value
+ } else {
+ // this.$message.warn(res.message)
+ this.$notification.warning({
+ message:'娑堟伅',
+ description:res.message
+ });
+ }
+ }).finally(() =>{
+ })
},
onSelectChange(selectedRowKeys, selectionRows) {
// this.SelectedList.push(selectedRowKeys);
@@ -181,6 +199,29 @@
this.selectionRows = selectionRows
// this.SelectedList =[...this.SelectedList,...selectionRows];
// console.log(this.SelectedList);
+ },
+ handleTableChange(pagination, filters, sorter) {
+ // this.onClearSelected()
+ //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂
+ //TODO 绛涢��
+ if (Object.keys(sorter).length > 0) {
+ this.isorter.column = sorter.field;
+ this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
+ }
+ this.ipagination = pagination;
+ this.loadData();
+ },
+ openPage() {
+ this.visible = true
+ this.onClearSelected()
+ this.dataSource = [];
+ this.queryParam = {
+ status: this.status
+ };
+
+ this.loadData();
+ this.initOptions();
+ this.initGroupOptions()
},
loadData(arg) {
if(!this.url.list){
@@ -224,6 +265,7 @@
modalFormOk(val) {
// 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
this.loadData();
+
this.selectedRowKeys = [val.id];
},
searchQuery() {
@@ -245,6 +287,8 @@
this.close()
},
handleOk() {
+ // this.selectionRows = this.SelectedList;
+ // console.log(this.selectionRows);
this.$emit('sendSelectionRows', this.selectionRows)
this.close()
},
diff --git a/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModalList.vue b/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModalList.vue
index c13d1e2..86d898c 100644
--- a/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModalList.vue
+++ b/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModalList.vue
@@ -1,13 +1,14 @@
+
<template>
- <a-modal :title="title" :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
+ <a-modal :title="title" width="70%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
cancelText="鍏抽棴">
<a-card :bordered="false">
<!-- 鏌ヨ鍖哄煙 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
- <a-col :md="6" :sm="6">
- <a-form-item label="閮ㄩ棬" >
+ <a-col :md="6" :sm="6" v-if="isDepartType == 0">
+ <a-form-item label="閮ㄩ棬" v-if="isDepartType == 0">
<!--<a-select v-model="queryParam.sectionPid" placeholder="璇烽�夋嫨閮ㄩ棬" :options="sectionPData" @change="initGroupOptions" />-->
<a-tree-select
v-model="value"
@@ -17,16 +18,16 @@
placeholder="璇烽�夋嫨閮ㄩ棬"
tree-default-expand-all
>
- <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">-->
- <!--Child Node1 {{ value }}-->
- <!--</span>-->
+ <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">-->
+ <!--Child Node1 {{ value }}-->
+ <!--</span>-->
</a-tree-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="6">
<a-form-item label="杞﹂棿" >
- <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨杞﹂棿" :options="sectionData"/>-->
+ <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨鍥㈤槦" :options="sectionData"/>-->
<a-tree-select
v-model="valueProduct"
style="width: 100%"
@@ -63,7 +64,7 @@
</div>
<!-- table鍖哄煙-begin -->
<div>
- <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns"
+ <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 400聽}" :columns="columns"
:dataSource="dataSource" :pagination="ipagination" :loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
@@ -75,6 +76,7 @@
</template>
<script>
+ import {mapActions} from 'vuex'
import {
ajaxGetSelectItems
} from '@/api/api'
@@ -95,7 +97,7 @@
import moment from 'moment'
export default {
- name: 'DeviceRepairListModel',
+ name: 'DeviceCalendarListModel',
mixins: [JeecgListMixin],
components: {
JDictSelectTag,
@@ -112,17 +114,30 @@
},
data() {
return {
- treeData:[],
- readOnly:true,
+ isDepartType:'',
+ /*readOnly:true,*/
title:'',
visible: false,
- disableMixinCreated: true,
- queryParam: {},
- columns: [{
- title: '璁惧缂栫爜',
- align: 'center',
- dataIndex: 'equipmentId',
- },
+ SelectedList:[],
+ treeData:[],
+ /*disableMixinCreated: true,
+ queryParam: {},*/
+ columns: [
+ {
+ title: '#',
+ dataIndex: '',
+ key: 'rowIndex',
+ width: 60,
+ align: "center",
+ customRender: function (t, r, index) {
+ return parseInt(index) + 1;
+ }
+ },{
+
+ title: '璁惧缂栫爜',
+ align: 'center',
+ dataIndex: 'equipmentId',
+ },
{
title: '璁惧鍚嶇О',
align: 'center',
@@ -131,13 +146,13 @@
{
title: '椹卞姩绫诲瀷',
align: 'center',
- dataIndex: 'driveType',
+ dataIndex: 'driveType'
},
{
title: '鏁版帶绯荤粺',
align: 'center',
- dataIndex: 'controlSystem',
- }
+ dataIndex: 'controlSystem'
+ },
],
sectionPData: [],
sectionData: [],
@@ -151,7 +166,7 @@
}
},
created() {
-
+ this.queryTreeData()
},
watch: {
value(value) {
@@ -162,18 +177,21 @@
this.queryParam.productionId = value
}
},
-
methods: {
- openPage() {
- this.visible = true
- this.onClearSelected()
- this.dataSource = [];
- this.queryParam = {
- status: this.status
- };
- this.loadData();
- this.initOptions();
- this.initGroupOptions()
+ ...mapActions(['QueryDepartTree']),
+ queryTreeData() {
+ this.QueryDepartTree().then(res => {
+ if (res.success) {
+ this.isDepartType = res.result[0].value
+ } else {
+ // this.$message.warn(res.message)
+ this.$notification.warning({
+ message:'娑堟伅',
+ description:res.message
+ });
+ }
+ }).finally(() =>{
+ })
},
onSelectChange(selectedRowKeys, selectionRows) {
// this.SelectedList.push(selectedRowKeys);
@@ -181,6 +199,29 @@
this.selectionRows = selectionRows
// this.SelectedList =[...this.SelectedList,...selectionRows];
// console.log(this.SelectedList);
+ },
+ handleTableChange(pagination, filters, sorter) {
+ // this.onClearSelected()
+ //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂
+ //TODO 绛涢��
+ if (Object.keys(sorter).length > 0) {
+ this.isorter.column = sorter.field;
+ this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
+ }
+ this.ipagination = pagination;
+ this.loadData();
+ },
+ openPage() {
+ this.visible = true
+ this.onClearSelected()
+ this.dataSource = [];
+ this.queryParam = {
+ status: this.status
+ };
+
+ this.loadData();
+ this.initOptions();
+ this.initGroupOptions()
},
loadData(arg) {
if(!this.url.list){
@@ -224,6 +265,7 @@
modalFormOk(val) {
// 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
this.loadData();
+
this.selectedRowKeys = [val.id];
},
searchQuery() {
@@ -245,6 +287,8 @@
this.close()
},
handleOk() {
+ // this.selectionRows = this.SelectedList;
+ // console.log(this.selectionRows);
this.$emit('sendSelectionRows', this.selectionRows)
this.close()
},
diff --git a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarListModel.vue b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarListModel.vue
index 6c88371..86d898c 100644
--- a/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarListModel.vue
+++ b/src/views/mdc/base/modules/deviceCalendar/DeviceCalendarListModel.vue
@@ -7,8 +7,8 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
- <a-col :md="6" :sm="6">
- <a-form-item label="閮ㄩ棬" >
+ <a-col :md="6" :sm="6" v-if="isDepartType == 0">
+ <a-form-item label="閮ㄩ棬" v-if="isDepartType == 0">
<!--<a-select v-model="queryParam.sectionPid" placeholder="璇烽�夋嫨閮ㄩ棬" :options="sectionPData" @change="initGroupOptions" />-->
<a-tree-select
v-model="value"
@@ -76,6 +76,7 @@
</template>
<script>
+ import {mapActions} from 'vuex'
import {
ajaxGetSelectItems
} from '@/api/api'
@@ -113,6 +114,7 @@
},
data() {
return {
+ isDepartType:'',
/*readOnly:true,*/
title:'',
visible: false,
@@ -164,7 +166,7 @@
}
},
created() {
-
+ this.queryTreeData()
},
watch: {
value(value) {
@@ -176,6 +178,21 @@
}
},
methods: {
+ ...mapActions(['QueryDepartTree']),
+ queryTreeData() {
+ this.QueryDepartTree().then(res => {
+ if (res.success) {
+ this.isDepartType = res.result[0].value
+ } else {
+ // this.$message.warn(res.message)
+ this.$notification.warning({
+ message:'娑堟伅',
+ description:res.message
+ });
+ }
+ }).finally(() =>{
+ })
+ },
onSelectChange(selectedRowKeys, selectionRows) {
// this.SelectedList.push(selectedRowKeys);
this.selectedRowKeys = selectedRowKeys;
diff --git a/src/views/mdc/base/modules/deviceRepair/DeviceRepairListModel.vue b/src/views/mdc/base/modules/deviceRepair/DeviceRepairListModel.vue
index c13d1e2..86d898c 100644
--- a/src/views/mdc/base/modules/deviceRepair/DeviceRepairListModel.vue
+++ b/src/views/mdc/base/modules/deviceRepair/DeviceRepairListModel.vue
@@ -1,13 +1,14 @@
+
<template>
- <a-modal :title="title" :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
+ <a-modal :title="title" width="70%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
cancelText="鍏抽棴">
<a-card :bordered="false">
<!-- 鏌ヨ鍖哄煙 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
- <a-col :md="6" :sm="6">
- <a-form-item label="閮ㄩ棬" >
+ <a-col :md="6" :sm="6" v-if="isDepartType == 0">
+ <a-form-item label="閮ㄩ棬" v-if="isDepartType == 0">
<!--<a-select v-model="queryParam.sectionPid" placeholder="璇烽�夋嫨閮ㄩ棬" :options="sectionPData" @change="initGroupOptions" />-->
<a-tree-select
v-model="value"
@@ -17,16 +18,16 @@
placeholder="璇烽�夋嫨閮ㄩ棬"
tree-default-expand-all
>
- <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">-->
- <!--Child Node1 {{ value }}-->
- <!--</span>-->
+ <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">-->
+ <!--Child Node1 {{ value }}-->
+ <!--</span>-->
</a-tree-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="6">
<a-form-item label="杞﹂棿" >
- <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨杞﹂棿" :options="sectionData"/>-->
+ <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨鍥㈤槦" :options="sectionData"/>-->
<a-tree-select
v-model="valueProduct"
style="width: 100%"
@@ -63,7 +64,7 @@
</div>
<!-- table鍖哄煙-begin -->
<div>
- <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns"
+ <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 400聽}" :columns="columns"
:dataSource="dataSource" :pagination="ipagination" :loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
@@ -75,6 +76,7 @@
</template>
<script>
+ import {mapActions} from 'vuex'
import {
ajaxGetSelectItems
} from '@/api/api'
@@ -95,7 +97,7 @@
import moment from 'moment'
export default {
- name: 'DeviceRepairListModel',
+ name: 'DeviceCalendarListModel',
mixins: [JeecgListMixin],
components: {
JDictSelectTag,
@@ -112,17 +114,30 @@
},
data() {
return {
- treeData:[],
- readOnly:true,
+ isDepartType:'',
+ /*readOnly:true,*/
title:'',
visible: false,
- disableMixinCreated: true,
- queryParam: {},
- columns: [{
- title: '璁惧缂栫爜',
- align: 'center',
- dataIndex: 'equipmentId',
- },
+ SelectedList:[],
+ treeData:[],
+ /*disableMixinCreated: true,
+ queryParam: {},*/
+ columns: [
+ {
+ title: '#',
+ dataIndex: '',
+ key: 'rowIndex',
+ width: 60,
+ align: "center",
+ customRender: function (t, r, index) {
+ return parseInt(index) + 1;
+ }
+ },{
+
+ title: '璁惧缂栫爜',
+ align: 'center',
+ dataIndex: 'equipmentId',
+ },
{
title: '璁惧鍚嶇О',
align: 'center',
@@ -131,13 +146,13 @@
{
title: '椹卞姩绫诲瀷',
align: 'center',
- dataIndex: 'driveType',
+ dataIndex: 'driveType'
},
{
title: '鏁版帶绯荤粺',
align: 'center',
- dataIndex: 'controlSystem',
- }
+ dataIndex: 'controlSystem'
+ },
],
sectionPData: [],
sectionData: [],
@@ -151,7 +166,7 @@
}
},
created() {
-
+ this.queryTreeData()
},
watch: {
value(value) {
@@ -162,18 +177,21 @@
this.queryParam.productionId = value
}
},
-
methods: {
- openPage() {
- this.visible = true
- this.onClearSelected()
- this.dataSource = [];
- this.queryParam = {
- status: this.status
- };
- this.loadData();
- this.initOptions();
- this.initGroupOptions()
+ ...mapActions(['QueryDepartTree']),
+ queryTreeData() {
+ this.QueryDepartTree().then(res => {
+ if (res.success) {
+ this.isDepartType = res.result[0].value
+ } else {
+ // this.$message.warn(res.message)
+ this.$notification.warning({
+ message:'娑堟伅',
+ description:res.message
+ });
+ }
+ }).finally(() =>{
+ })
},
onSelectChange(selectedRowKeys, selectionRows) {
// this.SelectedList.push(selectedRowKeys);
@@ -181,6 +199,29 @@
this.selectionRows = selectionRows
// this.SelectedList =[...this.SelectedList,...selectionRows];
// console.log(this.SelectedList);
+ },
+ handleTableChange(pagination, filters, sorter) {
+ // this.onClearSelected()
+ //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂
+ //TODO 绛涢��
+ if (Object.keys(sorter).length > 0) {
+ this.isorter.column = sorter.field;
+ this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
+ }
+ this.ipagination = pagination;
+ this.loadData();
+ },
+ openPage() {
+ this.visible = true
+ this.onClearSelected()
+ this.dataSource = [];
+ this.queryParam = {
+ status: this.status
+ };
+
+ this.loadData();
+ this.initOptions();
+ this.initGroupOptions()
},
loadData(arg) {
if(!this.url.list){
@@ -224,6 +265,7 @@
modalFormOk(val) {
// 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
this.loadData();
+
this.selectedRowKeys = [val.id];
},
searchQuery() {
@@ -245,6 +287,8 @@
this.close()
},
handleOk() {
+ // this.selectionRows = this.SelectedList;
+ // console.log(this.selectionRows);
this.$emit('sendSelectionRows', this.selectionRows)
this.close()
},
diff --git a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModalList.vue b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModalList.vue
index c13d1e2..86d898c 100644
--- a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModalList.vue
+++ b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateModalList.vue
@@ -1,13 +1,14 @@
+
<template>
- <a-modal :title="title" :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
+ <a-modal :title="title" width="70%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
cancelText="鍏抽棴">
<a-card :bordered="false">
<!-- 鏌ヨ鍖哄煙 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
- <a-col :md="6" :sm="6">
- <a-form-item label="閮ㄩ棬" >
+ <a-col :md="6" :sm="6" v-if="isDepartType == 0">
+ <a-form-item label="閮ㄩ棬" v-if="isDepartType == 0">
<!--<a-select v-model="queryParam.sectionPid" placeholder="璇烽�夋嫨閮ㄩ棬" :options="sectionPData" @change="initGroupOptions" />-->
<a-tree-select
v-model="value"
@@ -17,16 +18,16 @@
placeholder="璇烽�夋嫨閮ㄩ棬"
tree-default-expand-all
>
- <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">-->
- <!--Child Node1 {{ value }}-->
- <!--</span>-->
+ <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">-->
+ <!--Child Node1 {{ value }}-->
+ <!--</span>-->
</a-tree-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="6">
<a-form-item label="杞﹂棿" >
- <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨杞﹂棿" :options="sectionData"/>-->
+ <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨鍥㈤槦" :options="sectionData"/>-->
<a-tree-select
v-model="valueProduct"
style="width: 100%"
@@ -63,7 +64,7 @@
</div>
<!-- table鍖哄煙-begin -->
<div>
- <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns"
+ <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 400聽}" :columns="columns"
:dataSource="dataSource" :pagination="ipagination" :loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
@@ -75,6 +76,7 @@
</template>
<script>
+ import {mapActions} from 'vuex'
import {
ajaxGetSelectItems
} from '@/api/api'
@@ -95,7 +97,7 @@
import moment from 'moment'
export default {
- name: 'DeviceRepairListModel',
+ name: 'DeviceCalendarListModel',
mixins: [JeecgListMixin],
components: {
JDictSelectTag,
@@ -112,17 +114,30 @@
},
data() {
return {
- treeData:[],
- readOnly:true,
+ isDepartType:'',
+ /*readOnly:true,*/
title:'',
visible: false,
- disableMixinCreated: true,
- queryParam: {},
- columns: [{
- title: '璁惧缂栫爜',
- align: 'center',
- dataIndex: 'equipmentId',
- },
+ SelectedList:[],
+ treeData:[],
+ /*disableMixinCreated: true,
+ queryParam: {},*/
+ columns: [
+ {
+ title: '#',
+ dataIndex: '',
+ key: 'rowIndex',
+ width: 60,
+ align: "center",
+ customRender: function (t, r, index) {
+ return parseInt(index) + 1;
+ }
+ },{
+
+ title: '璁惧缂栫爜',
+ align: 'center',
+ dataIndex: 'equipmentId',
+ },
{
title: '璁惧鍚嶇О',
align: 'center',
@@ -131,13 +146,13 @@
{
title: '椹卞姩绫诲瀷',
align: 'center',
- dataIndex: 'driveType',
+ dataIndex: 'driveType'
},
{
title: '鏁版帶绯荤粺',
align: 'center',
- dataIndex: 'controlSystem',
- }
+ dataIndex: 'controlSystem'
+ },
],
sectionPData: [],
sectionData: [],
@@ -151,7 +166,7 @@
}
},
created() {
-
+ this.queryTreeData()
},
watch: {
value(value) {
@@ -162,18 +177,21 @@
this.queryParam.productionId = value
}
},
-
methods: {
- openPage() {
- this.visible = true
- this.onClearSelected()
- this.dataSource = [];
- this.queryParam = {
- status: this.status
- };
- this.loadData();
- this.initOptions();
- this.initGroupOptions()
+ ...mapActions(['QueryDepartTree']),
+ queryTreeData() {
+ this.QueryDepartTree().then(res => {
+ if (res.success) {
+ this.isDepartType = res.result[0].value
+ } else {
+ // this.$message.warn(res.message)
+ this.$notification.warning({
+ message:'娑堟伅',
+ description:res.message
+ });
+ }
+ }).finally(() =>{
+ })
},
onSelectChange(selectedRowKeys, selectionRows) {
// this.SelectedList.push(selectedRowKeys);
@@ -181,6 +199,29 @@
this.selectionRows = selectionRows
// this.SelectedList =[...this.SelectedList,...selectionRows];
// console.log(this.SelectedList);
+ },
+ handleTableChange(pagination, filters, sorter) {
+ // this.onClearSelected()
+ //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂
+ //TODO 绛涢��
+ if (Object.keys(sorter).length > 0) {
+ this.isorter.column = sorter.field;
+ this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
+ }
+ this.ipagination = pagination;
+ this.loadData();
+ },
+ openPage() {
+ this.visible = true
+ this.onClearSelected()
+ this.dataSource = [];
+ this.queryParam = {
+ status: this.status
+ };
+
+ this.loadData();
+ this.initOptions();
+ this.initGroupOptions()
},
loadData(arg) {
if(!this.url.list){
@@ -224,6 +265,7 @@
modalFormOk(val) {
// 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
this.loadData();
+
this.selectedRowKeys = [val.id];
},
searchQuery() {
@@ -245,6 +287,8 @@
this.close()
},
handleOk() {
+ // this.selectionRows = this.SelectedList;
+ // console.log(this.selectionRows);
this.$emit('sendSelectionRows', this.selectionRows)
this.close()
},
diff --git a/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModalList.vue b/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModalList.vue
index c13d1e2..86d898c 100644
--- a/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModalList.vue
+++ b/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModalList.vue
@@ -1,13 +1,14 @@
+
<template>
- <a-modal :title="title" :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
+ <a-modal :title="title" width="70%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
cancelText="鍏抽棴">
<a-card :bordered="false">
<!-- 鏌ヨ鍖哄煙 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
- <a-col :md="6" :sm="6">
- <a-form-item label="閮ㄩ棬" >
+ <a-col :md="6" :sm="6" v-if="isDepartType == 0">
+ <a-form-item label="閮ㄩ棬" v-if="isDepartType == 0">
<!--<a-select v-model="queryParam.sectionPid" placeholder="璇烽�夋嫨閮ㄩ棬" :options="sectionPData" @change="initGroupOptions" />-->
<a-tree-select
v-model="value"
@@ -17,16 +18,16 @@
placeholder="璇烽�夋嫨閮ㄩ棬"
tree-default-expand-all
>
- <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">-->
- <!--Child Node1 {{ value }}-->
- <!--</span>-->
+ <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">-->
+ <!--Child Node1 {{ value }}-->
+ <!--</span>-->
</a-tree-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="6">
<a-form-item label="杞﹂棿" >
- <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨杞﹂棿" :options="sectionData"/>-->
+ <!--<a-select v-model="queryParam.sectionId" placeholder="璇烽�夋嫨鍥㈤槦" :options="sectionData"/>-->
<a-tree-select
v-model="valueProduct"
style="width: 100%"
@@ -63,7 +64,7 @@
</div>
<!-- table鍖哄煙-begin -->
<div>
- <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns"
+ <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 400聽}" :columns="columns"
:dataSource="dataSource" :pagination="ipagination" :loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
@@ -75,6 +76,7 @@
</template>
<script>
+ import {mapActions} from 'vuex'
import {
ajaxGetSelectItems
} from '@/api/api'
@@ -95,7 +97,7 @@
import moment from 'moment'
export default {
- name: 'DeviceRepairListModel',
+ name: 'DeviceCalendarListModel',
mixins: [JeecgListMixin],
components: {
JDictSelectTag,
@@ -112,17 +114,30 @@
},
data() {
return {
- treeData:[],
- readOnly:true,
+ isDepartType:'',
+ /*readOnly:true,*/
title:'',
visible: false,
- disableMixinCreated: true,
- queryParam: {},
- columns: [{
- title: '璁惧缂栫爜',
- align: 'center',
- dataIndex: 'equipmentId',
- },
+ SelectedList:[],
+ treeData:[],
+ /*disableMixinCreated: true,
+ queryParam: {},*/
+ columns: [
+ {
+ title: '#',
+ dataIndex: '',
+ key: 'rowIndex',
+ width: 60,
+ align: "center",
+ customRender: function (t, r, index) {
+ return parseInt(index) + 1;
+ }
+ },{
+
+ title: '璁惧缂栫爜',
+ align: 'center',
+ dataIndex: 'equipmentId',
+ },
{
title: '璁惧鍚嶇О',
align: 'center',
@@ -131,13 +146,13 @@
{
title: '椹卞姩绫诲瀷',
align: 'center',
- dataIndex: 'driveType',
+ dataIndex: 'driveType'
},
{
title: '鏁版帶绯荤粺',
align: 'center',
- dataIndex: 'controlSystem',
- }
+ dataIndex: 'controlSystem'
+ },
],
sectionPData: [],
sectionData: [],
@@ -151,7 +166,7 @@
}
},
created() {
-
+ this.queryTreeData()
},
watch: {
value(value) {
@@ -162,18 +177,21 @@
this.queryParam.productionId = value
}
},
-
methods: {
- openPage() {
- this.visible = true
- this.onClearSelected()
- this.dataSource = [];
- this.queryParam = {
- status: this.status
- };
- this.loadData();
- this.initOptions();
- this.initGroupOptions()
+ ...mapActions(['QueryDepartTree']),
+ queryTreeData() {
+ this.QueryDepartTree().then(res => {
+ if (res.success) {
+ this.isDepartType = res.result[0].value
+ } else {
+ // this.$message.warn(res.message)
+ this.$notification.warning({
+ message:'娑堟伅',
+ description:res.message
+ });
+ }
+ }).finally(() =>{
+ })
},
onSelectChange(selectedRowKeys, selectionRows) {
// this.SelectedList.push(selectedRowKeys);
@@ -181,6 +199,29 @@
this.selectionRows = selectionRows
// this.SelectedList =[...this.SelectedList,...selectionRows];
// console.log(this.SelectedList);
+ },
+ handleTableChange(pagination, filters, sorter) {
+ // this.onClearSelected()
+ //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂
+ //TODO 绛涢��
+ if (Object.keys(sorter).length > 0) {
+ this.isorter.column = sorter.field;
+ this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
+ }
+ this.ipagination = pagination;
+ this.loadData();
+ },
+ openPage() {
+ this.visible = true
+ this.onClearSelected()
+ this.dataSource = [];
+ this.queryParam = {
+ status: this.status
+ };
+
+ this.loadData();
+ this.initOptions();
+ this.initGroupOptions()
},
loadData(arg) {
if(!this.url.list){
@@ -224,6 +265,7 @@
modalFormOk(val) {
// 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
this.loadData();
+
this.selectedRowKeys = [val.id];
},
searchQuery() {
@@ -245,6 +287,8 @@
this.close()
},
handleOk() {
+ // this.selectionRows = this.SelectedList;
+ // console.log(this.selectionRows);
this.$emit('sendSelectionRows', this.selectionRows)
this.close()
},
diff --git a/src/views/system/DepartList.vue b/src/views/system/DepartList.vue
index 8ce57c7..c9446ce 100644
--- a/src/views/system/DepartList.vue
+++ b/src/views/system/DepartList.vue
@@ -106,10 +106,11 @@
</a-empty>
</a-card>
</a-tab-pane>
- <!--<a-tab-pane tab="閮ㄩ棬鏉冮檺" key="2" forceRender>-->
+ <a-tab-pane tab="閮ㄩ棬鏉冮檺" key="2" forceRender>
<!--<depart-auth-modal ref="departAuth"/>-->
- <!--</a-tab-pane>-->
- <a-tab-pane tab="璁惧鍒楄〃" key="2" forceRender>
+ <depart-m-auth-modal ref="departMAuth"></depart-m-auth-modal>
+ </a-tab-pane>
+ <a-tab-pane v-if="isDepartType == 0" tab="璁惧鍒楄〃" key="3" forceRender>
<depart-auth-modal ref="departAuth"/>
</a-tab-pane>
</a-tabs>
@@ -119,11 +120,15 @@
</a-row>
</template>
<script>
+ import {mapActions} from 'vuex'
+ import DepartMModal from './modules/DepartModal'
import DepartModal from './modules/DepartList/DepartModal'
import {queryDepartTreeList, searchByKeywords, deleteByDepartId} from '@/api/api'
import {httpAction, deleteAction} from '@/api/manage'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import DepartAuthModal from './modules/DepartList/DepartAuthModal'
+ import DepartMAuthModal from './modules/DepartAuthModal'
+
// 琛ㄥご
const columns = [
{
@@ -168,10 +173,13 @@
mixins: [JeecgListMixin],
components: {
DepartAuthModal,
- DepartModal
+ DepartModal,
+ DepartMModal,
+ DepartMAuthModal
},
data() {
return {
+ isDepartType:"",
iExpandedKeys: [],
loading: false,
autoExpandParent: true,
@@ -229,6 +237,21 @@
}
},
methods: {
+ ...mapActions(['QueryDepartTree']),
+ queryTreeData() {
+ this.QueryDepartTree().then(res => {
+ if (res.success) {
+ this.isDepartType = res.result[0].value
+ } else {
+ // this.$message.warn(res.message)
+ this.$notification.warning({
+ message:'娑堟伅',
+ description:res.message
+ });
+ }
+ }).finally(() =>{
+ })
+ },
loadData() {
this.refresh();
},
@@ -383,7 +406,11 @@
this.selectedKeys = [record.key]
this.model.parentId = record.parentId
this.setValuesToForm(record)
- this.$refs.departAuth.show(record.id);
+ if(this.isDepartType == 0){
+ this.$refs.departAuth.show(record.id);
+ }
+
+ this.$refs.departMAuth.show(record.id)
},
// 瑙﹀彂onSelect浜嬩欢鏃�,涓洪儴闂ㄦ爲鍙充晶鐨刦orm琛ㄥ崟璧嬪��
@@ -402,7 +429,11 @@
this.checkedKeys = []
this.currSelected = {}
this.selectedKeys = []
- this.$refs.departAuth.departId = ''
+ if(this.isDepartType == 0){
+ this.$refs.departAuth.departId = ''
+
+ }
+ this.$refs.departMAuth.departId = ''
},
handleNodeTypeChange(val) {
this.currSelected.nodeType = val
@@ -556,6 +587,7 @@
},
created() {
+ this.queryTreeData()
this.currFlowId = this.$route.params.id
this.currFlowName = this.$route.params.name
// this.loadTree()
--
Gitblit v1.9.3