|
|
@@ -219,6 +219,7 @@
|
|
|
</el-row>
|
|
|
|
|
|
<editEvaluate ref="Evaluate" @success="getList()"></editEvaluate>
|
|
|
+ <DialogThreeState ref="DialogThreeState"> </DialogThreeState>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -233,12 +234,15 @@ import {
|
|
|
} from "@/api/resumption/outsourcing.js";
|
|
|
import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
|
|
|
import editEvaluate from "./editDialog.vue";
|
|
|
+import DialogThreeState from "@/components/message/threeStateMessageBox.vue";
|
|
|
+import * as api from "@/api/resumption/outsourcing";
|
|
|
export default {
|
|
|
name: "SocWebIndex",
|
|
|
dicts: ["sys_org_type", "plan_status"],
|
|
|
components: {
|
|
|
OrgTree,
|
|
|
editEvaluate,
|
|
|
+ DialogThreeState,
|
|
|
},
|
|
|
data() {
|
|
|
const { params, query } = this.$route;
|
|
|
@@ -328,22 +332,53 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
} else {
|
|
|
- this.$modal
|
|
|
- .confirm("是否确认发布?")
|
|
|
- .then(function () {})
|
|
|
- .then(() => {
|
|
|
- publishEvaluate(row.id).then((res) => {
|
|
|
- let { code, msg } = res;
|
|
|
- if (code == 200) {
|
|
|
- this.getList();
|
|
|
- this.$modal.msgSuccess("发布成功");
|
|
|
- } else {
|
|
|
- this.$modal.msgSuccess(msg);
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
+ // this.$modal
|
|
|
+ // .confirm("是否确认发布?")
|
|
|
+ // .then(function () {})
|
|
|
+ // .then(() => {
|
|
|
+ // publishEvaluate(row.id).then((res) => {
|
|
|
+ // let { code, msg } = res;
|
|
|
+ // if (code == 200) {
|
|
|
+ // this.getList();
|
|
|
+ // this.$modal.msgSuccess("发布成功");
|
|
|
+ // } else {
|
|
|
+ // this.$modal.msgSuccess(msg);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+ let msg = "请选择下发后立即生成或下周期生成任务?";
|
|
|
+ this.$refs["DialogThreeState"].show(
|
|
|
+ msg,
|
|
|
+ (state) => {
|
|
|
+ if (state == 0 || state == 1) {
|
|
|
+ this. distribute(row.id, state == 1);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ yesText: "立即生成",
|
|
|
+ noText: "下周期",
|
|
|
+ cancelText: "取消",
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
},
|
|
|
+ distribute(id, immediateEffect) {
|
|
|
+ this.loading = true;
|
|
|
+ api
|
|
|
+ .publishEvaluate(id, immediateEffect)
|
|
|
+ .then((response) => {
|
|
|
+ if (response.data == 0) {
|
|
|
+ this.loading = false;
|
|
|
+ } else {
|
|
|
+ this.getList();
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((response) => {
|
|
|
+ this.getList();
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
deleteHandler(row) {
|
|
|
this.$modal
|
|
|
.confirm("是否确认删除?")
|