|
@@ -40,7 +40,7 @@
|
|
|
</el-button>
|
|
|
</span>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<!-- 功能按钮 -->
|
|
|
<el-row class="filter-container">
|
|
|
<el-col>
|
|
@@ -51,6 +51,8 @@
|
|
|
<el-button type="danger" icon="el-icon-delete" size="medium" @click="batchDelete">
|
|
|
{{ $t("table.delete") }}
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-thumb" size="medium" @click="updateStatus('1')">{{$t("common.audio.addAudio")}}</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-suitcase" size="medium" @click="audioBtn()">{{$t("common.audio.audio")}}</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
@@ -154,6 +156,31 @@
|
|
|
<div v-html="preview.context" />
|
|
|
</el-scrollbar>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ v-el-drag-dialog
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :close-on-press-escape="true"
|
|
|
+ :title='$t("common.audio.audio")'
|
|
|
+ width="400px"
|
|
|
+ top="150px"
|
|
|
+ :visible.sync="audioIsVisible"
|
|
|
+ >
|
|
|
+ <template>
|
|
|
+ <el-row>
|
|
|
+ <el-radio v-model="audioVal" label="2">{{$t("common.audio.audioOk")}}</el-radio>
|
|
|
+ <el-radio v-model="audioVal" label="3">{{$t("common.audio.aduioFail")}}</el-radio>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="margin-top: 30px;text-align: center;">
|
|
|
+ <el-button plain type="primary" size="medium" @click="audioOk">
|
|
|
+ {{ $t("common.confirm") }}
|
|
|
+ </el-button>
|
|
|
+ <el-button plain type="danger" size="medium" @click="colseAudio">
|
|
|
+ {{ $t("common.cancel") }}
|
|
|
+ </el-button>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -164,8 +191,7 @@
|
|
|
// 【换班管理】-API
|
|
|
import shiftChangeMgrApi from "@/api/classScheduleMgr/shiftChangeMgr"
|
|
|
import elDragDialog from '@/directive/el-drag-dialog'
|
|
|
- import { downloadFile, initEnums, initDicts, initQueryParams } from '@/utils/commons'
|
|
|
- import axios from 'axios'
|
|
|
+ import {initDicts, initQueryParams } from '@/utils/commons'
|
|
|
export default {
|
|
|
name: "ShiftChangeMgr",
|
|
|
directives: { elDragDialog },
|
|
@@ -176,6 +202,8 @@
|
|
|
return {
|
|
|
tags: ['','warning','success','danger'],
|
|
|
audioStatus: [],
|
|
|
+ audioIsVisible: false,
|
|
|
+ audioVal: '2', //默认【审核通过】
|
|
|
dialog: {
|
|
|
isVisible: false,
|
|
|
title: ""
|
|
@@ -246,7 +274,7 @@
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
viewClose () {
|
|
@@ -291,9 +319,9 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
const readonlyIndex = this.selection.findIndex(item => item.readonly)
|
|
|
-
|
|
|
+
|
|
|
if (readonlyIndex > -1) {
|
|
|
this.$message({
|
|
|
message: this.$t("tips.systemData"),
|
|
@@ -301,8 +329,8 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
- this.$confirm(this.$t("lineSide.tips.wareTips"), this.$t("common.tips"), {
|
|
|
+
|
|
|
+ this.$confirm(this.$t("calssSchedule.tips.shiftChangeTips"), this.$t("common.tips"), {
|
|
|
distinguishCancelAndClose: true,
|
|
|
confirmButtonText: this.$t("common.confirm"),
|
|
|
cancelButtonText: this.$t("common.cancel"),
|
|
@@ -385,7 +413,7 @@
|
|
|
this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
|
|
|
this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.queryParams.current = params.current ? params.current : this.queryParams.current
|
|
|
this.queryParams.size = params.size ? params.size : this.queryParams.size
|
|
|
shiftChangeMgrApi.page(this.queryParams).then(response => {
|
|
@@ -395,7 +423,7 @@
|
|
|
}
|
|
|
// eslint-disable-next-line no-return-assign
|
|
|
}).finally(() => this.loading = false)
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
cellClick (row, column) {
|
|
|
if (column['columnKey'] === "operation") {
|
|
@@ -408,11 +436,97 @@
|
|
|
this.$refs.table.toggleRowSelection(row)
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
if (!flag) {
|
|
|
this.$refs.table.toggleRowSelection(row, true)
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ // 【提交审核】按钮-事件
|
|
|
+ updateStatus(status){
|
|
|
+ if (!this.selection.length) {
|
|
|
+ this.$message({
|
|
|
+ message: this.$t("tips.noDataSelected"),
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.selection.length > 1) {
|
|
|
+ this.$message({
|
|
|
+ message: this.$t("tips.mustOne"),
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 调用API
|
|
|
+ this.audio(status)
|
|
|
+ },
|
|
|
+ // 【取消】审核按钮-事件
|
|
|
+ colseAudio(){
|
|
|
+ this.audioIsVisible = false
|
|
|
+ },
|
|
|
+ // 【确定】审核按钮-事件
|
|
|
+ audioOk(){
|
|
|
+ // 调用审核
|
|
|
+ this.audio(false)
|
|
|
+ },
|
|
|
+ // 【审核产品】-按钮事件
|
|
|
+ audioBtn(){
|
|
|
+ if (!this.selection.length) {
|
|
|
+ this.$message({
|
|
|
+ message: this.$t("tips.noDataSelected"),
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.selection.length > 1) {
|
|
|
+ this.$message({
|
|
|
+ message: this.$t("tips.mustOne"),
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.audioIsVisible = true
|
|
|
+ },
|
|
|
+ // 【审核产品】-Table的Row操作事件
|
|
|
+ audioBtnRow(row) {
|
|
|
+ // 清除所有的选择数据
|
|
|
+ this.$refs.table.clearSelection()
|
|
|
+ // 设置当前行为选中的数据
|
|
|
+ this.$refs.table.toggleRowSelection(row, true)
|
|
|
+ // 弹出审核页面
|
|
|
+ this.audioIsVisible = true
|
|
|
+ },
|
|
|
+ // 【审核通过/审核不通过】接口-事件
|
|
|
+ audio(status){
|
|
|
+ if(!status){
|
|
|
+ status = this.audioVal
|
|
|
+ }
|
|
|
+ // 赋值
|
|
|
+ this.selection[0].status = status
|
|
|
+ let msg = "提交审核成功!"
|
|
|
+ if(status == "2"){
|
|
|
+ msg = "审核通过!"
|
|
|
+ }
|
|
|
+ if(status == "3"){
|
|
|
+ msg = "审核不通过!"
|
|
|
+ }
|
|
|
+ shiftChangeMgrApi.updateStatus({ id: this.selection[0].id, auditStatus: status}).then(response => {
|
|
|
+ if (response.status == 200) {
|
|
|
+ // 如果是审核,成功后,关闭弹出框
|
|
|
+ if(status == '2' || status == '3'){
|
|
|
+ this.audioIsVisible = false
|
|
|
+ // 审核成功后,改成默认值
|
|
|
+ this.audioVal = '2'
|
|
|
+ }
|
|
|
+ this.$message({
|
|
|
+ message: msg,
|
|
|
+ type: "success"
|
|
|
+ })
|
|
|
+ // 重新查询列表数据
|
|
|
+ this.search()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|