fix:排版任务 修改窗口增加日期选择控件

This commit is contained in:
xiaoguangbin 2024-11-13 09:53:20 +08:00
parent 76c525be63
commit d0792e9357

View File

@ -115,7 +115,19 @@
<!-- 增加/编辑排班弹窗 -->
<custom-modal :title="isAdd ? 'Add' : 'Edit'" :width="845" v-model="visible" :okHandler="submit" destroy-on-close>
<a-spin :spinning="isGettingDetail">
<div style=" margin: 0 auto;display: flex; width: 672px;">
</div>
<div class="account-assign">
<div class="scheduling-date">
<label>Task Date</label>
<a-range-picker
dropdownClassName="asd"
:default-value="[moment(startTime), moment(endTime)]"
@change="onRangeDateChange"
:allowClear="false"
:style="{width:'200px'}"
/>
</div>
<div class="search">
<!-- 穿梭框左上方搜索 -->
<div class="station-search">
@ -252,7 +264,10 @@ export default {
checkedAccount: '', // 穿
rightAccountChildSelectedKeys: [], // 穿
rightAccountChildExpandedKeys: [], // 穿
startTime: moment().format('YYYY-MM-DD'),
endTime: moment().format('YYYY-MM-DD'),
isChanging: false,
dragItem: null,
fromUserId: '',
@ -299,6 +314,7 @@ export default {
this.getStationList()
},
methods: {
moment,
//
async getList() {
this.spinningMain = true
@ -538,11 +554,17 @@ export default {
successMsg = 'Add Success'
failMsg = 'Add Fail'
}
const params = []
if(!this.startTime || !this.endTime) {
this.$message.warn('Please select a date!')
return;
}
const tasks = []
this.accountTreeData.forEach((accountTreeItem) => {
if (accountTreeItem.children.length) {
params.push({
schedulingDate: this.currentDate.format('YYYY-MM-DD HH:mm:ss'),
tasks.push({
// fix: 20241112
// schedulingDate: this.currentDate.format('YYYY-MM-DD HH:mm:ss'),
stationList: accountTreeItem.children.map((child) => {
return {
stationId: child.key,
@ -552,6 +574,11 @@ export default {
})
}
})
const params = {
startTime: this.startTime,
endTime: this.endTime,
sysTasks: tasks
}
const { success } = await method(url, params)
if (success) {
this.$message.success(successMsg)
@ -668,6 +695,11 @@ export default {
}
this.targetKeys = targetKeys
},
onRangeDateChange(date, dateString) {
// this.timer = 0
this.startTime = dateString[0]
this.endTime = dateString[1]
},
},
computed: {
treeData() {
@ -935,23 +967,31 @@ export default {
width: 672px;
margin: 0 auto;
.scheduling-date{
margin-bottom: 15px;
label {
width: 81px;
}
}
.scheduling-date,
.station-search,
.account-search {
width: 282px;
display: flex;
align-items: center;
label {
color: #5b9cba;
font-size: 16px;
flex-shrink: 0;
margin-right: 10px;
user-select: none;
}
}
.search {
display: flex;
justify-content: space-between;
.station-search,
.account-search {
width: 282px;
display: flex;
align-items: center;
label {
color: #5b9cba;
font-size: 16px;
flex-shrink: 0;
margin-right: 10px;
user-select: none;
}
}
}
.ant-transfer {