This commit is contained in:
@jyuhsin
2026-03-04 14:48:46 +08:00
parent aaa228a2af
commit ae31df1557
2 changed files with 33 additions and 32 deletions
@@ -226,37 +226,40 @@ layout("/layouts/platform.html"){
}, },
handleTaskAction(val) { handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", { this.$refs.formRef.validate(valid => {
confirmButtonText: "确定", if (!valid) return
cancelButtonText: "取消", this.$confirm("您确定要提交吗?", "提示", {
type: "warning" confirmButtonText: "确定",
}).then(() => { cancelButtonText: "取消",
// 是否有协办单位 type: "warning"
let tf_helpunitreply; }).then(() => {
if (this.formData.tf_slaveUnitIds && this.formData.tf_slaveUnitIds.length > 0) { // 是否有协办单位
tf_helpunitreply = 'HAS_HELP_UNIT' let tf_helpunitreply;
} else { if (this.formData.tf_slaveUnitIds && this.formData.tf_slaveUnitIds.length > 0) {
tf_helpunitreply = 'NO_HELP_UNIT' tf_helpunitreply = 'HAS_HELP_UNIT'
} } else {
tf_helpunitreply = 'NO_HELP_UNIT'
const loading = createLoading('提交中')
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val,
tf_masterUnitName: this.formData.tf_masterUnitId ? this.underTakeOptions.find(v => v.id === this.formData.tf_masterUnitId)?.name : null,
tf_slaveUnitNames: this.formData.tf_slaveUnitIds.map(v => this.underTakeOptions.find(v2 => v2.id === v)?.name),
tf_slaveUnitNameStr: this.formData.tf_slaveUnitIds.map(v => this.underTakeOptions.find(v2 => v2.id === v)?.name).join(','),
tf_helpunitreply: tf_helpunitreply
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
} }
}).finally(() => {
loading.close() const loading = createLoading('提交中')
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val,
tf_masterUnitName: this.formData.tf_masterUnitId ? this.underTakeOptions.find(v => v.id === this.formData.tf_masterUnitId)?.name : null,
tf_slaveUnitNames: this.formData.tf_slaveUnitIds.map(v => this.underTakeOptions.find(v2 => v2.id === v)?.name),
tf_slaveUnitNameStr: this.formData.tf_slaveUnitIds.map(v => this.underTakeOptions.find(v2 => v2.id === v)?.name).join(','),
tf_helpunitreply: tf_helpunitreply
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
}) })
}) })
}, },
@@ -148,8 +148,6 @@ layout("/layouts/platform.html"){
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(() => { }).then(() => {
console.log(this.formData)
return
this.$axios.post("/flow/common/executeTask", { this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({ data: JSON.stringify({
...this.formData, ...this.formData,