fix:排版任务 修改窗口增加日期选择控件
This commit is contained in:
parent
76c525be63
commit
d0792e9357
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user