|
|
@@ -191,6 +191,15 @@
|
|
|
v-hasPermi="['qw:sopTemp:edit']"
|
|
|
>管理规则
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.sendType == 11"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleBatchOfficial(scope.row)"
|
|
|
+ v-hasPermi="['qw:sopTemp:edit']"
|
|
|
+ >开关官方群发
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
@@ -351,6 +360,20 @@
|
|
|
<el-button type="primary" @click="updateRedData" :disabled="redData.loading">保 存</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="批量编辑官方群发" :visible.sync="official.open" width="500px" append-to-body>
|
|
|
+ <el-form :model="officialForm" ref="officialForm" :inline="true">
|
|
|
+ <el-form-item label="官方群发" prop="isOfficial">
|
|
|
+ <el-radio-group v-model="officialForm.isOfficial">
|
|
|
+ <el-radio :label="0">关</el-radio>
|
|
|
+ <el-radio :label="1">开</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer" style="display: flex;justify-content: flex-end;">
|
|
|
+ <el-button type="primary" @click="updateOfficial" :loading="official.loading">保 存</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
|
|
|
<el-dialog :title="shareOptions.title" :visible.sync="shareOptions.open" width="800px" append-to-body>
|
|
|
|
|
|
@@ -428,7 +451,8 @@ import {
|
|
|
redList,
|
|
|
shareSopTemp,
|
|
|
updateRedPackage,
|
|
|
- updateTemp
|
|
|
+ updateTemp,
|
|
|
+ batchOpenOrCloseOfficial
|
|
|
} from "@/api/qw/sopTemp";
|
|
|
import { getCompanyList, listCompany } from '@/api/company/company'
|
|
|
import {courseList, getRoles} from "@/api/qw/sop";
|
|
|
@@ -441,6 +465,14 @@ export default {
|
|
|
components: {Treeselect},
|
|
|
data() {
|
|
|
return {
|
|
|
+ officialForm:{
|
|
|
+ tempId:null,
|
|
|
+ isOfficial:null,
|
|
|
+ },
|
|
|
+ official:{
|
|
|
+ open:false,
|
|
|
+ loading:false,
|
|
|
+ },
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
companysloading: false,
|
|
|
@@ -788,6 +820,17 @@ export default {
|
|
|
this.$router.push(url)
|
|
|
// }
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 批量编辑官方群发
|
|
|
+ */
|
|
|
+ handleBatchOfficial(row){
|
|
|
+ this.officialForm={
|
|
|
+ tempId:null,
|
|
|
+ isOfficial:null
|
|
|
+ }
|
|
|
+ this.officialForm.tempId = row.id;
|
|
|
+ this.official.open = true;
|
|
|
+ },
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdateRed(row) {
|
|
|
this.redData.open = true;
|
|
|
@@ -955,6 +998,28 @@ export default {
|
|
|
let len = old - val;
|
|
|
this.form.timeList.splice(Math.max(this.form.timeList.length - len, 0), len);
|
|
|
}
|
|
|
+ },
|
|
|
+ updateOfficial(){
|
|
|
+ if(!!this.officialForm){
|
|
|
+ if(this.officialForm.tempId == null || this.officialForm.tempId == '' || this.officialForm.tempId == undefined){
|
|
|
+ this.$message.error("参数错误");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(this.officialForm.isOfficial === null || this.officialForm.isOfficial === undefined){
|
|
|
+ this.$message.error("请选择官方群发操作结果");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.$message.error("参数错误");
|
|
|
+ }
|
|
|
+ this.official.loading = true;
|
|
|
+ batchOpenOrCloseOfficial(this.officialForm).then(res=>{
|
|
|
+ this.msgSuccess("保存成功");
|
|
|
+ this.official.loading = false;
|
|
|
+ this.official.open = false;
|
|
|
+ }).catch(res=>{
|
|
|
+ this.official.loading = false;
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|