From 39f1b58ed87d5b05bde112762c51d384471ae1b5 Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期一, 13 十一月 2023 10:42:08 +0800
Subject: [PATCH] 1、优化首页布局 2、班次班制管理页面表格数据新增增加表单项验证 3、班次班制管理页面新增班次时如果并未选择开始与结束休息时间,应默认为空,而不是当前时间 4、班次班制管理页面新增或修改班次时如果选择跨天,则时间请求参数会混乱,应与不跨天时保持一致
---
src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModalList.vue | 128 ++++++++++++++++++++++++++++++------------
1 files changed, 92 insertions(+), 36 deletions(-)
diff --git a/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModalList.vue b/src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModalList.vue
index 270c9d8..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){
@@ -211,7 +252,11 @@
}
//update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
}else{
- this.$message.warning(res.message)
+ // this.$message.warning(res.message)
+ this.$notification.warning({
+ message:'娑堟伅',
+ description:res.message
+ });
}
}).finally(() => {
this.loading = false
@@ -220,6 +265,7 @@
modalFormOk(val) {
// 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
this.loadData();
+
this.selectedRowKeys = [val.id];
},
searchQuery() {
@@ -241,6 +287,8 @@
this.close()
},
handleOk() {
+ // this.selectionRows = this.SelectedList;
+ // console.log(this.selectionRows);
this.$emit('sendSelectionRows', this.selectionRows)
this.close()
},
@@ -249,7 +297,11 @@
if (res.success) {
this.treeData = res.result
} else {
- this.$message.warning(res.message)
+ // this.$message.warning(res.message)
+ this.$notification.warning({
+ message:'娑堟伅',
+ description:res.message
+ });
}
})
},
@@ -260,7 +312,11 @@
if (res.success) {
this.sectionData = res.result
} else {
- this.$message.warning(res.message)
+ // this.$message.warning(res.message)
+ this.$notification.warning({
+ message:'娑堟伅',
+ description:res.message
+ });
}
})
}
--
Gitblit v1.9.3