Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
aixianling
2022-09-02 17:18:17 +08:00
3 changed files with 37 additions and 23 deletions

View File

@@ -41,7 +41,7 @@
<div class="examine_person" v-if="enableExamine == true">
<div><span class="color_red">*</span><span class="title">审批人</span></div>
<div @click="getDeptUser">
<span v-if="!userList.length">请选择人员<u-icon name="arrow-right" color="#CCD0D3"></u-icon></span>
<span v-if="!userList.length" class="color_gray">请选择人员<u-icon name="arrow-right" color="#CCD0D3"></u-icon></span>
<div v-if="userList.length">
<AiOpenData type="departmentName" :openid="departmentId"/>
</div>
@@ -54,7 +54,7 @@
<div class="examine_person" v-if="isTimedTask == true">
<div><span class="color_red">*</span><span class="title">发送时间</span></div>
<div @click="showTaskTime = true">
<span style="color: '#CCD0D3'" v-if="!form.choiceTime.length">请选择</span>
<span class="color_gray" v-if="!form.choiceTime.length">请选择</span>
<span v-if="form.choiceTime.length">{{ form.choiceTime }}</span>
<u-icon name="arrow-right" color="#CCD0D3"/>
</div>
@@ -96,6 +96,8 @@
</div>
</div>
<AiConsole></AiConsole>
<div class="btn">
<div class="submitBtn" @click="confirm">发送</div>
</div>
@@ -127,6 +129,7 @@ export default {
files: [],
showTaskTime: false,
userList: [],
userListIds: [],
showPopup: false,
params: {
year: true,
@@ -199,33 +202,42 @@ export default {
// if(this.getExtension(item.name)==)
})
if(!this.form.taskTitle) {
return this.$u.toast('请输入任务名称')
}
if(!this.form.sendScope) {
return this.$u.toast('请选择发送范围')
}
if(!this.form.contents.length) {
return this.$u.toast("请输入发送内容")
}
// if(!this.enableExamine) {
// if(!this.form.examines.length) {
// return this.$u.toast("请选择审批人")
// } else {
// this.form.enableExamine = '1'
// }
// }
if(this.enableExamine) {
if(!this.form.examines.length) {
return this.$u.toast("请选择审批人")
} else {
this.form.enableExamine = '1'
}
}
if(!this.isTimedTask) {
if(this.isTimedTask) {
if(!this.form.choiceTime.length) {
return this.$u.toast("请选择发送时间")
}
}
this.flag = true
this.$http.post(`/app/appmasssendingtask/addOrUpdate`, { ...this.form }).then(res=>{
this.flag = false
if(res?.code ==0) {
// uni.navigateBack()
this.flag = false
this.$u.toast("新增成功")
}
})
}
}).catch((err)=>{
this.flag = false
this.$u.toast(err)
})
},
@@ -234,12 +246,11 @@ export default {
fromDepartmentId: 0,
mode: "multi",
type: ["user"],
// selectedDepartmentIds: this.departList?.map(e => e.id)
selectedUserIds: this.userList?.map(e => e.id)
}).then((res)=>{
// if(res?.departmentList) {
// this.departmentId = res.departmentList[0].id
// }
if(res?.userList) {
this.userListIds = res.userList.map(e => e.id)
}
}
).catch((err) => {
console.log(err);
@@ -331,6 +342,9 @@ export default {
.color_red {
color: #FF4466;
}
.color_gray {
color: #CCD0D3;
}
.inpt {
margin-left: 14px;
}

View File

@@ -38,9 +38,9 @@
</div>
</div>
<u-calendar v-model="showCalendar" mode="range" @change="selectDate"></u-calendar>
<AiConsole></AiConsole>
<div class="btn">
<div class="submitBtn" @click="submit">确定</div>
@@ -79,10 +79,8 @@ export default {
fromDepartmentId: 0,
mode: "multi",
type: ["user"],
// selectedDepartmentIds: this.departList?.map(e => e.id)
selectedUserIds: this.userList?.map(e => e.id)
}).then((res)=>{
console.log(res);
if(res?.userList) {
this.userListIds = res.userList.map(e => e.id)
}

View File

@@ -15,6 +15,8 @@
</div>
</div>
<AiConsole></AiConsole>
<div class="btn">
<div class="submitBtn" @click="submit">确定</div>
</div>