Browse Source

防止删除按键

xiaowang-featrue
是小王呀\24601 10 months ago
parent
commit
778748b417
  1. 78
      src/views/modules/shequzhili/event/cpts/process-form-assign.vue
  2. 10
      src/views/modules/shequzhili/eventOld/cpts/event-info.vue
  3. 1
      src/views/modules/volunteer/activityArchive/index.vue

78
src/views/modules/shequzhili/event/cpts/process-form-assign.vue

@ -12,7 +12,7 @@
<el-form-item label="指派处理部门" prop="assignDeptIds" label-width="150px" <el-form-item label="指派处理部门" prop="assignDeptIds" label-width="150px"
:class="{ 'form-item': source === 'visiual' }"> :class="{ 'form-item': source === 'visiual' }">
<el-cascader class="cell-width-1" ref="agencyIdArray" filterable clearable :filter-method="filter" v-model.trim="agencyIdArray" :options="orgOptions" <el-cascader class="cell-width-1" ref="agencyIdArray" filterable clearable :filter-method="filter" v-model.trim="agencyIdArray" :options="orgOptions"
:props="orgOptionProps" :show-all-levels="false" @change="handleChangeAgency"></el-cascader> :props="orgOptionProps" :show-all-levels="false" @change="handleChangeAgency" @clear="handClear"></el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="派件时间" prop="createdTime" label-width="150px" <el-form-item label="派件时间" prop="createdTime" label-width="150px"
:class="{ 'form-item': source === 'visiual' }" style="display: block"> :class="{ 'form-item': source === 'visiual' }" style="display: block">
@ -153,26 +153,66 @@ export default {
}, },
created() { created() {
this.formData.createdTime = this.$dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'); this.formData.createdTime = this.$dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
},
async mounted() {
const { user } = this.$store.state; const { user } = this.$store.state;
this.agencyId = user.agencyId; this.agencyId = user.agencyId;
this.getOrgTreeList(); this.getOrgTreeList();
},
async mounted() {
if (this.eventId) { if (this.eventId) {
console.log(this.orgOptions);
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData)); this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
console.log(this.eventDetailCopy.currentProcessDeptIds,"dskfklsdn");
this.formData.handlingReq = this.eventDetailCopy.handlingReq; this.formData.handlingReq = this.eventDetailCopy.handlingReq;
this.formData.transferAdvice = this.eventDetailCopy.transferAdvice; this.formData.transferAdvice = this.eventDetailCopy.transferAdvice;
let dateTime = new Date(new Date(this.eventDetailCopy.timeLimit).getTime()- (1000 * 60 * 60 * 24)) let dateTime = new Date(new Date(this.eventDetailCopy.timeLimit).getTime()- (1000 * 60 * 60 * 24))
let yesterday = `${dateTime.getFullYear()}-${(dateTime.getMonth() +1)}-${dateTime.getDate()}` let yesterday = `${dateTime.getFullYear()}-${(dateTime.getMonth() +1)}-${dateTime.getDate()}`
console.log('yesterday',yesterday) console.log('yesterday',yesterday)
this.formData.timeLimit = yesterday + ' ' + '16:00:00' this.formData.timeLimit = yesterday + ' ' + '16:00:00'
this.formData.contactTime = this.$dayjs(new Date(new Date().getTime() + (1000 * 60 * 60))).format('YYYY-MM-DD HH:mm:ss') this.formData.contactTime = this.$dayjs(new Date(new Date().getTime() + (1000 * 60 * 60))).format('YYYY-MM-DD HH:mm:ss')
} }
}, },
methods: { methods: {
//
handClear(){
this.$confirm('你确定要清除所有选项吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
//
this.agencyIdArray = []; //
}).catch(() => {
//
});
},
//西
findParentPath(data, agencyIds) {
let paths = [];
function findPathRecursive(agencyId, node, path) {
;
if (node.agencyId === agencyId) {
path.push(agencyId);
paths.push(path.slice()); // Make a copy of the path array before pushing
return true;
}
if (node.subAgencyList) {
for (let i = 0; i < node.subAgencyList.length; i++) {
if (findPathRecursive(agencyId, node.subAgencyList[i], path.concat(node.agencyId))) {
return true;
}
}
}
return false;
}
agencyIds.forEach(agencyId => {
findPathRecursive(agencyId, data, []);
});
console.log(paths,"paths");
return paths;
},
handelInputContent(val) { handelInputContent(val) {
this.$EventBus.$emit('handelInputEventContent', { type: 'opinion', value: val }) this.$EventBus.$emit('handelInputEventContent', { type: 'opinion', value: val })
}, },
@ -189,9 +229,13 @@ export default {
} }
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params)
if (code === 0) { if (code === 0) {
console.log(data,"sdfljsldf");
this.orgOptions = [] this.orgOptions = []
this.orgOptions.push(data) this.orgOptions.push(data)
this.orgOptionsCopy.push(data) this.orgOptionsCopy.push(data)
var paths1 = this.findParentPath(this.orgOptions[0],this.eventDetailCopy.currentProcessDeptIds);
console.log(paths1,"dslsdfjlsd");
this.agencyIdArray=paths1
} else { } else {
this.$message.error(msg) this.$message.error(msg)
} }
@ -209,9 +253,12 @@ export default {
} }
}, },
handleChangeAgency(val) { handleChangeAgency(val) {
this.$nextTick(() => { // let parth =this.agencyIdArray
this.$confirm('你确定要清除所有选项吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
let obj = this.$refs["agencyIdArray"].getCheckedNodes() let obj = this.$refs["agencyIdArray"].getCheckedNodes()
const assignDeptIds = [] const assignDeptIds = []
const assignDeptNames = [] const assignDeptNames = []
@ -221,14 +268,10 @@ export default {
assignDeptNames.push(obj[val].data.agencyName) assignDeptNames.push(obj[val].data.agencyName)
levels.push(obj[val].data.level) levels.push(obj[val].data.level)
} }
console.log('assignDeptIds',assignDeptIds); console.log('assignDeptIds',assignDeptIds);
console.log('assignDeptNames',assignDeptNames); console.log('assignDeptNames',assignDeptNames);
console.log('levels',levels); console.log('levels',levels);
if (obj) { if (obj) {
this.formData.levels = levels this.formData.levels = levels
this.formData.assignDeptIds = assignDeptIds this.formData.assignDeptIds = assignDeptIds
this.formData.assignDeptNames = assignDeptNames this.formData.assignDeptNames = assignDeptNames
@ -237,7 +280,14 @@ export default {
this.form.orgId = '' this.form.orgId = ''
} }
}); }).catch(()=>{
var paths1 = this.findParentPath(this.orgOptions[0],this.eventDetailCopy.currentProcessDeptIds);
console.log(paths1,"dslsdfjlsd");
this.agencyIdArray=paths1
})
}, },
handleChangeCate() { handleChangeCate() {
if (this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0]) { if (this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0]) {

10
src/views/modules/shequzhili/eventOld/cpts/event-info.vue

@ -356,6 +356,8 @@ export default {
created() { }, created() { },
mounted() { mounted() {
this.pageTypeCopy = this.pageType; this.pageTypeCopy = this.pageType;
if (this.pageTypeCopy !== "add") { if (this.pageTypeCopy !== "add") {
this.getProjectProcess(); this.getProjectProcess();
} }
@ -511,6 +513,12 @@ export default {
this.grid = val.value; this.grid = val.value;
}, },
async handelDispose() { async handelDispose() {
console.log(this.grid,"DSFKDSFJDKS");
if(!this.grid){
console.log(this.grid,"DSFKDSFJDKS");
this.$message.error("请选择网格");
return
}
this.$refs.ref_processinfo_dispose.getProcessInfo(); this.$refs.ref_processinfo_dispose.getProcessInfo();
if (this.$refs.ref_processinfo_dispose.okflag) { if (this.$refs.ref_processinfo_dispose.okflag) {
this.formData.operationType = this.$refs.ref_processinfo_dispose.operationType; this.formData.operationType = this.$refs.ref_processinfo_dispose.operationType;
@ -527,7 +535,7 @@ export default {
this.replayInfo.openFlag = null; this.replayInfo.openFlag = null;
this.replayInfo.openId = this.eventDetailCopy.openId; this.replayInfo.openId = this.eventDetailCopy.openId;
this.replayInfo.gridId = this.grid; this.replayInfo.gridId = this.grid;
// //
let url = "/governance/icEventOld/reply"; let url = "/governance/icEventOld/reply";
await this.submitDispose(url, this.replayInfo); await this.submitDispose(url, this.replayInfo);
} else if (this.formData.operationType === "1") { } else if (this.formData.operationType === "1") {

1
src/views/modules/volunteer/activityArchive/index.vue

@ -84,6 +84,7 @@
<el-button type="text" v-if="scope.row.statusType=='未发布'&&scope.row.client !== 1" style="color:#1C6AFD;" size="small" <el-button type="text" v-if="scope.row.statusType=='未发布'&&scope.row.client !== 1" style="color:#1C6AFD;" size="small"
@click="handleDetail(scope.row)">修改</el-button> @click="handleDetail(scope.row)">修改</el-button>
<el-button type="text" style="color:#1C6AFD;" size="small" @click="handleselect(scope.row)">查看</el-button> <el-button type="text" style="color:#1C6AFD;" size="small" @click="handleselect(scope.row)">查看</el-button>
<el-button v-if="scope.row.auditStatus === 2" type="text" style="color:#1C6AFD;" size="small" @click="handledelete(scope.row)">删除活动</el-button>
<el-button type="text"v-if="scope.row.auditStatus === 0" style="color:#1C6AFD;" size="small" @click="handleprocessl(scope.row)">审核</el-button> <el-button type="text"v-if="scope.row.auditStatus === 0" style="color:#1C6AFD;" size="small" @click="handleprocessl(scope.row)">审核</el-button>
<el-button v-if="scope.row.online === 1 &&scope.row.statusType!='进行中'" <el-button v-if="scope.row.online === 1 &&scope.row.statusType!='进行中'"
type="text" style="color:#1C6AFD;" size="small" @click="handleupOnline(scope.row)">下线</el-button> type="text" style="color:#1C6AFD;" size="small" @click="handleupOnline(scope.row)">下线</el-button>

Loading…
Cancel
Save