|
@@ -141,129 +141,183 @@ export default {
|
|
},
|
|
},
|
|
//发布
|
|
//发布
|
|
btnPublish(){
|
|
btnPublish(){
|
|
- this.$confirm('确认要发布吗?', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'success'
|
|
|
|
- }).then(() => {
|
|
|
|
- try {
|
|
|
|
- this.loading = true;
|
|
|
|
- publishStage(this.form).then(response => {
|
|
|
|
- this.fetchStage(this.id);
|
|
|
|
- this.$modal.msgSuccess("发布成功");
|
|
|
|
- });
|
|
|
|
- } catch (err) {
|
|
|
|
- console.error(err);
|
|
|
|
- } finally {
|
|
|
|
- this.loading = false;
|
|
|
|
- }
|
|
|
|
- }).catch(() => {
|
|
|
|
- });
|
|
|
|
|
|
+ this.$confirm("确认要发布吗?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "info",
|
|
|
|
+ beforeClose: async (action, instance,done) => {
|
|
|
|
+ if (action === "confirm") {
|
|
|
|
+ instance.confirmButtonLoading = true;
|
|
|
|
+ instance.confirmButtonText = "执行中...";
|
|
|
|
+ try {
|
|
|
|
+ const { msg, code } = await publishStage(this.form);
|
|
|
|
+ if (code === 200) {
|
|
|
|
+ this.$modal.msgSuccess("发布成功");
|
|
|
|
+ await this.fetchStage(this.id);
|
|
|
|
+ }
|
|
|
|
+ } catch (err) {
|
|
|
|
+ console.error(err);
|
|
|
|
+ instance.confirmButtonText = "确认";
|
|
|
|
+ } finally {
|
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
|
+ done();
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ done();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ }).then(() => {})
|
|
|
|
+ .catch(() => {});
|
|
},
|
|
},
|
|
//填写结束
|
|
//填写结束
|
|
btnFillinFinish(){
|
|
btnFillinFinish(){
|
|
- this.$confirm('确认要结束填写吗?', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'success'
|
|
|
|
- }).then(() => {
|
|
|
|
- try {
|
|
|
|
- this.loading = true;
|
|
|
|
- fillinFinish(this.form).then(response => {
|
|
|
|
- this.fetchStage(this.id);
|
|
|
|
- this.$modal.msgSuccess("保存成功");
|
|
|
|
- });
|
|
|
|
- } catch (err) {
|
|
|
|
- console.error(err);
|
|
|
|
- } finally {
|
|
|
|
- this.loading = false;
|
|
|
|
- }
|
|
|
|
- }).catch(() => {
|
|
|
|
- });
|
|
|
|
|
|
+ this.$confirm("确认要结束填写吗?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "info",
|
|
|
|
+ beforeClose: async (action, instance,done) => {
|
|
|
|
+ if (action === "confirm") {
|
|
|
|
+ instance.confirmButtonLoading = true;
|
|
|
|
+ instance.confirmButtonText = "执行中...";
|
|
|
|
+ try {
|
|
|
|
+ const { msg, code } = await fillinFinish(this.form);
|
|
|
|
+ if (code === 200) {
|
|
|
|
+ this.$modal.msgSuccess("保存成功");
|
|
|
|
+ await this.fetchStage(this.id);
|
|
|
|
+ }
|
|
|
|
+ } catch (err) {
|
|
|
|
+ console.error(err);
|
|
|
|
+ instance.confirmButtonText = "确认";
|
|
|
|
+ } finally {
|
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
|
+ done();
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ done();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ }).then(() => {})
|
|
|
|
+ .catch(() => {});
|
|
},
|
|
},
|
|
//开始自评
|
|
//开始自评
|
|
btnStartSelfEvaluation(){
|
|
btnStartSelfEvaluation(){
|
|
- this.$confirm('确认要开启自评吗?', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'success'
|
|
|
|
- }).then(() => {
|
|
|
|
- try {
|
|
|
|
- this.loading = true;
|
|
|
|
- startSelfEvaluation(this.form).then(response => {
|
|
|
|
- this.fetchStage(this.id);
|
|
|
|
- this.$modal.msgSuccess("开启成功");
|
|
|
|
- });
|
|
|
|
- } catch (err) {
|
|
|
|
- console.error(err);
|
|
|
|
- } finally {
|
|
|
|
- this.loading = false;
|
|
|
|
- }
|
|
|
|
- }).catch(() => {
|
|
|
|
- });
|
|
|
|
|
|
+ this.$confirm("确认要开启自评吗?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "info",
|
|
|
|
+ beforeClose: async (action, instance,done) => {
|
|
|
|
+ if (action === "confirm") {
|
|
|
|
+ instance.confirmButtonLoading = true;
|
|
|
|
+ instance.confirmButtonText = "执行中...";
|
|
|
|
+ try {
|
|
|
|
+ const { msg, code } = await startSelfEvaluation(this.form);
|
|
|
|
+ if (code === 200) {
|
|
|
|
+ this.$modal.msgSuccess("开启成功");
|
|
|
|
+ await this.fetchStage(this.id);
|
|
|
|
+ }
|
|
|
|
+ } catch (err) {
|
|
|
|
+ console.error(err);
|
|
|
|
+ instance.confirmButtonText = "确认";
|
|
|
|
+ } finally {
|
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
|
+ done();
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ done();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ }).then(() => {})
|
|
|
|
+ .catch(() => {});
|
|
},
|
|
},
|
|
//结束自评
|
|
//结束自评
|
|
btnFinishSelfEvaluation(){
|
|
btnFinishSelfEvaluation(){
|
|
- this.$confirm('确认要结束评分吗?', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'success'
|
|
|
|
- }).then(() => {
|
|
|
|
- try {
|
|
|
|
- this.loading = true;
|
|
|
|
- finishSelfEvaluation(this.form).then(response => {
|
|
|
|
- this.fetchStage(this.id);
|
|
|
|
- this.$modal.msgSuccess("结束成功");
|
|
|
|
- });
|
|
|
|
- } catch (err) {
|
|
|
|
- console.error(err);
|
|
|
|
- } finally {
|
|
|
|
- this.loading = false;
|
|
|
|
- }
|
|
|
|
- }).catch(() => {
|
|
|
|
- });
|
|
|
|
|
|
+ this.$confirm("确认要结束评分吗?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "info",
|
|
|
|
+ beforeClose: async (action, instance,done) => {
|
|
|
|
+ if (action === "confirm") {
|
|
|
|
+ instance.confirmButtonLoading = true;
|
|
|
|
+ instance.confirmButtonText = "执行中...";
|
|
|
|
+ try {
|
|
|
|
+ const { msg, code } = await finishSelfEvaluation(this.form);
|
|
|
|
+ if (code === 200) {
|
|
|
|
+ this.$modal.msgSuccess("结束成功");
|
|
|
|
+ await this.fetchStage(this.id);
|
|
|
|
+ }
|
|
|
|
+ } catch (err) {
|
|
|
|
+ console.error(err);
|
|
|
|
+ instance.confirmButtonText = "确认";
|
|
|
|
+ } finally {
|
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
|
+ done();
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ done();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ }).then(() => {})
|
|
|
|
+ .catch(() => {});
|
|
},
|
|
},
|
|
//开启等级调整
|
|
//开启等级调整
|
|
btnOpenGradeAdjust(){
|
|
btnOpenGradeAdjust(){
|
|
- this.$confirm('确认要开启等级调整?', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'success'
|
|
|
|
- }).then(() => {
|
|
|
|
- try {
|
|
|
|
- this.loading = true;
|
|
|
|
- openGradeAdjust(this.form).then(response => {
|
|
|
|
- this.fetchStage(this.id);
|
|
|
|
- this.$modal.msgSuccess("已开始");
|
|
|
|
- });
|
|
|
|
- } catch (err) {
|
|
|
|
- console.error(err);
|
|
|
|
- } finally {
|
|
|
|
- this.loading = false;
|
|
|
|
- }
|
|
|
|
- }).catch(() => {
|
|
|
|
- });
|
|
|
|
|
|
+ this.$confirm("确认要开启等级调整?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "info",
|
|
|
|
+ beforeClose: async (action, instance,done) => {
|
|
|
|
+ if (action === "confirm") {
|
|
|
|
+ instance.confirmButtonLoading = true;
|
|
|
|
+ instance.confirmButtonText = "执行中...";
|
|
|
|
+ try {
|
|
|
|
+ const { msg, code } = await openGradeAdjust(this.form);
|
|
|
|
+ if (code === 200) {
|
|
|
|
+ this.$modal.msgSuccess("已开始");
|
|
|
|
+ await this.fetchStage(this.id);
|
|
|
|
+ }
|
|
|
|
+ } catch (err) {
|
|
|
|
+ console.error(err);
|
|
|
|
+ instance.confirmButtonText = "确认";
|
|
|
|
+ } finally {
|
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
|
+ done();
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ done();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ }).then(() => {})
|
|
|
|
+ .catch(() => {});
|
|
},
|
|
},
|
|
//关闭等级调整
|
|
//关闭等级调整
|
|
btnCloseGradeAdjust(){
|
|
btnCloseGradeAdjust(){
|
|
- this.$confirm('确认要关闭等级调整?', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'success'
|
|
|
|
- }).then(() => {
|
|
|
|
- try {
|
|
|
|
- this.loading = true;
|
|
|
|
- closeGradeAdjust(this.form).then(response => {
|
|
|
|
- this.fetchStage(this.id);
|
|
|
|
- this.$modal.msgSuccess("已关闭");
|
|
|
|
- });
|
|
|
|
- } catch (err) {
|
|
|
|
- console.error(err);
|
|
|
|
- } finally {
|
|
|
|
- this.loading = false;
|
|
|
|
- }
|
|
|
|
- }).catch(() => {
|
|
|
|
- });
|
|
|
|
|
|
+ this.$confirm("确认要关闭等级调整?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "info",
|
|
|
|
+ beforeClose: async (action, instance,done) => {
|
|
|
|
+ if (action === "confirm") {
|
|
|
|
+ instance.confirmButtonLoading = true;
|
|
|
|
+ instance.confirmButtonText = "执行中...";
|
|
|
|
+ try {
|
|
|
|
+ const { msg, code } = await closeGradeAdjust(this.form);
|
|
|
|
+ if (code === 200) {
|
|
|
|
+ this.$modal.msgSuccess("已关闭");
|
|
|
|
+ await this.fetchStage(this.id);
|
|
|
|
+ }
|
|
|
|
+ } catch (err) {
|
|
|
|
+ console.error(err);
|
|
|
|
+ instance.confirmButtonText = "确认";
|
|
|
|
+ } finally {
|
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
|
+ done();
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ done();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ }).then(() => {})
|
|
|
|
+ .catch(() => {});
|
|
},
|
|
},
|
|
//分数调整
|
|
//分数调整
|
|
btnAdjustMark(){
|
|
btnAdjustMark(){
|
|
@@ -271,24 +325,33 @@ export default {
|
|
},
|
|
},
|
|
//过数到薪资
|
|
//过数到薪资
|
|
btnCendToSalary(){
|
|
btnCendToSalary(){
|
|
- this.$confirm('确认要同步到薪资绩效系数吗?', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'success'
|
|
|
|
- }).then(() => {
|
|
|
|
- try {
|
|
|
|
- this.loading = true;
|
|
|
|
- cendToSalary(this.form).then(response => {
|
|
|
|
- this.fetchStage(this.id);
|
|
|
|
- this.$modal.msgSuccess("操作成功");
|
|
|
|
- });
|
|
|
|
- } catch (err) {
|
|
|
|
- console.error(err);
|
|
|
|
- } finally {
|
|
|
|
- this.loading = false;
|
|
|
|
- }
|
|
|
|
- }).catch(() => {
|
|
|
|
- });
|
|
|
|
|
|
+ this.$confirm("确认要同步到薪资绩效系数吗?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "info",
|
|
|
|
+ beforeClose: async (action, instance,done) => {
|
|
|
|
+ if (action === "confirm") {
|
|
|
|
+ instance.confirmButtonLoading = true;
|
|
|
|
+ instance.confirmButtonText = "执行中...";
|
|
|
|
+ try {
|
|
|
|
+ const { msg, code } = await cendToSalary(this.form);
|
|
|
|
+ if (code === 200) {
|
|
|
|
+ this.$modal.msgSuccess("操作成功");
|
|
|
|
+ await this.fetchStage(this.id);
|
|
|
|
+ }
|
|
|
|
+ } catch (err) {
|
|
|
|
+ console.error(err);
|
|
|
|
+ instance.confirmButtonText = "确认";
|
|
|
|
+ } finally {
|
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
|
+ done();
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ done();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ }).then(() => {})
|
|
|
|
+ .catch(() => {});
|
|
},
|
|
},
|
|
//修改
|
|
//修改
|
|
btnEdit(){
|
|
btnEdit(){
|