教培功能bug

dev
zhangyanli 2024-03-30 14:56:58 +08:00
parent 23ed3b63a1
commit 80ab578870
3 changed files with 108 additions and 22 deletions

View File

@ -116,7 +116,7 @@
border
fit
highlight-current-row>
<el-table-column :reserve-selection="true" type="selection" width="55" align="center" />
<el-table-column :reserve-selection="true" :selectable="selectable" type="selection" width="55" align="center"/>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="CURRICULUMNAME" label="课程名称" />
<el-table-column v-if="checkList.includes('')" :show-overflow-tooltip="true" prop="CREATTIME" label="上传时间" />
@ -153,7 +153,7 @@
<template slot-scope="{row}">
<el-button type="text" @click="goInfo(row.CURRICULUM_ID)"></el-button>
<el-divider direction="vertical"/>
<el-button type="text" @click="handleBatchEditState(row.PRIVATE_CURRICULUM_ID)"></el-button>
<el-button :disabled="row.IS_CORP_CREATE == 1" type="text" @click="handleBatchEditState(row.PRIVATE_CURRICULUM_ID)"></el-button>
</template>
</el-table-column>
</el-table>
@ -354,6 +354,13 @@ export default {
getRowKey(row) {
return row.PRIVATE_CURRICULUM_ID
},
selectable(row) {
if (row.IS_CORP_CREATE == 1) {
return false
} else {
return true
}
},
//
getQuery() {
this.$refs.multipleTable.clearSelection()
@ -728,7 +735,6 @@ export default {
}
}
}
</script>
<style>
.tree_dialog .selectTree{

View File

@ -76,7 +76,7 @@
type="selection"
width="55"
align="center"/>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column :selectable="selectable" type="index" label="序号" width="50" align="center"/>
<el-table-column prop="EXAMNAME" label="试卷名称" />
<el-table-column v-if="checkList.includes('')" prop="CREATTIME" label="上传时间" align="center" />
<el-table-column v-if="checkList.includes('满分')" prop="EXAMSCORE" label="满分" align="center">
@ -113,7 +113,7 @@
<template slot-scope="{row}">
<el-button type="text" @click="handleShowExam(row.STAGEEXAMPAPERINPUT_ID)"></el-button>
<span class="app-divider"/>
<el-button v-show="del" type="text" @click="handleDelete(row.PRIVATE_STAGEEXAMPAPER_ID)">
<el-button v-show="del" :disabled="row.SOURCETYPE == '2'" type="text" @click="handleDelete(row.PRIVATE_STAGEEXAMPAPER_ID)">
<span>移除试卷</span>
</el-button>
</template>
@ -386,6 +386,13 @@ export default {
this.$refs.multipleTable.clearSelection()
this.getList()
},
selectable(row) {
if (row.SOURCETYPE == '2') {
return false
} else {
return true
}
},
goKeyReset() {
this.KEYWORDS = ''
this.TRAINTYPE = ''

View File

@ -248,8 +248,19 @@
<el-row>
<el-col :span="12">
<el-form-item label="培训行业类型" prop="TRAINTYPE">
<SelectTree ref="keyHyRef" :options="trainDicList" :props="defaultProps" v-model="form.TRAINTYPE" style="width: 100%" placeholder="请选择培训行业类型" />
<el-form-item label="培训行业类型" prop="INDUSTRY_TYPE">
<el-cascader
ref="industryType"
v-model="form.INDUSTRY_TYPE"
:options="trainDicList"
:props="{
value: 'INDUSTRYTYPE_ID',
label: 'NAME',
children: 'nodes',
checkStrictly: true
}"
style="width: 100%;"
/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -382,6 +393,46 @@
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="lh-1">
<el-row>
<el-col :span="24">
<div class="lh-1">
<el-form-item label="公章" class="is-required">
<div class="disContent">
<div v-for="(item, index) in official_seal_file" :key="index" class="img-div">
<img :src="config.fileUrl + item.FILEPATH" alt="">
<div class="disContent-hide">
<el-tooltip class="item" effect="dark" content="预览" placement="top">
<span class="el-icon-zoom-in yuLan">
<viewer :images="official_seal_file">
<img :src="config.fileUrl + item.FILEPATH" alt="" class="yuLanImg">
</viewer>
</span>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<span class="Delete" @click="deleteImage(index)"><i class="el-icon-delete" /></span>
</el-tooltip>
</div>
</div>
<el-upload ref="upload_seal" :on-preview="handlePictureCardPreview" :on-change="beforeOfficialSealUpload" :class="{hide:officialSealUpload}" :limit="1" :auto-upload="false" class="avatar-uploader" action="#" accept=".jpg,.jpeg,.png" list-type="picture-card">
<i class="el-icon-plus" />
</el-upload>
</div>
<el-dialog :visible.sync="dialogVisible">
<img :src="dialogImageUrl" width="100%" alt="">
</el-dialog>
</el-form-item>
</div>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
<el-divider content-position="left">安全负责人信息</el-divider>
<el-row>
<el-col :span="12">
@ -669,6 +720,7 @@ export default {
LONGITUDE: '',
dialogImageUrl: '',
dialogVisible: false,
officialSealUpload: false,
formList: [
{ 'ID': '3', 'NAME': '3天' },
{ 'ID': '7', 'NAME': '7天' },
@ -745,6 +797,7 @@ export default {
INDUSTRY_DEPARTMENT: '', //
INDUSTRY_DEPARTMENTName: '',
SCALE_TYPE: 0, //
INDUSTRY_TYPE: '', //
SAFETY_NAME: '', //
SAFETY_POST: '', //
SAFETY_BACKGROUND: '', //
@ -797,6 +850,7 @@ export default {
industryArr: [],
industryNameArr: [],
bus_images: [],
official_seal_file: [],
bus_files: [],
four_images: [],
four_files: [],
@ -869,7 +923,7 @@ export default {
message: '请输入正确的手机号码'
}
],
TRAINTYPE: [
INDUSTRY_TYPE: [
{ required: true, message: '培训行业类型不能为空', trigger: 'blur' }
],
USERS_NUM: [
@ -940,8 +994,8 @@ export default {
label: 'label',
children: 'children'
},
// agentNumList: [],
// AGENT_NUMBER_ID: '',
agentNumList: [],
AGENT_NUMBER_ID: '',
msg: 'edit',
isAdmin: false
}
@ -1125,6 +1179,7 @@ export default {
console.log(this.form)
this.changeArea()
this.form.FOURTYPE = data.pd.FOURTYPE ? data.pd.FOURTYPE + '' : '1'
this.form.INDUSTRY_TYPE = JSON.parse(data.pd.INDUSTRY_TYPE)
if (data.pd.ecoOption && data.pd.ecoOption.length > 0) {
this.jjlxList = data.pd.ecoOption
} else {
@ -1161,13 +1216,9 @@ export default {
this.$refs.corpOfTypeRef.handleNodeClick(node)
})
}
const nodea = {}
nodea.id = this.form.TRAINTYPE
this.$nextTick(() => { // 使
this.$refs.keyHyRef.handleNodeClick(nodea)
})
this.$forceUpdate()
this.bus_images = data.busImgs
this.official_seal_file = data.official_seal_file
if (data.pd.FOURTYPE == 1) {
this.four_images = data.fourImgs
}
@ -1251,6 +1302,13 @@ export default {
})
return false
}
if (this.official_seal_file.length + this.$refs.upload_seal.uploadFiles.length < 1) {
this.$message({
message: '请上传公章',
type: 'error'
})
return false
}
if (this.form.ISTRIAL == 0) {
this.form.STATUS = 2
if (!this.form.TRIALTIME) {
@ -1300,7 +1358,6 @@ export default {
Object.keys(this.form).map(key => {
formData.append(key, this.form[key])
})
console.log(this.form.REGULARTYPE)
if (this.$refs.upload.uploadFiles.length > 0) {
for (var i = 0; i < this.$refs.upload.uploadFiles.length; i++) {
if (this.$refs.upload.uploadFiles[i]) {
@ -1308,6 +1365,13 @@ export default {
}
}
}
if (this.$refs.upload_seal.uploadFiles.length > 0) {
for (var j = 0; j < this.$refs.upload_seal.uploadFiles.length; j++) {
if (this.$refs.upload_seal.uploadFiles[j]) {
formData.append('official_seal_file', this.$refs.upload_seal.uploadFiles[j].raw)
}
}
}
if (this.form.FOURTYPE == '1') {
if (this.$refs.fourUpload.uploadFiles.length > 0) {
// eslint-disable-next-line no-redeclare
@ -1320,7 +1384,10 @@ export default {
} else if (this.form.FOURTYPE == '2') {
formData.append('fourFiles', this.FFILE)
}
formData.delete('INDUSTRY_TYPE')
const addrs = this.$refs['industryType'].presentText
formData.append('INDUSTRY_NAME', addrs)
formData.append('INDUSTRY_TYPE', this.form.INDUSTRY_TYPE.join())
formData.append('isOldData', this.isOldData)
formData.append('EDITFOURTYPE', this.form.FOURTYPE == this.OLDFOURTYPE)
upload(
@ -1463,6 +1530,15 @@ export default {
fileList.pop()
}
},
beforeOfficialSealUpload(file, fileList) {
const types = ['image/jpeg', 'image/jpg', 'image/png']
const isImage = types.includes(file.raw.type)
if (!isImage) {
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!')
fileList.pop()
}
this.officialSealUpload = fileList.length >= 1
},
before3DFileUpload(file) {
this.form.FFILE = file // 使
this.FFILE = file // 使
@ -1529,13 +1605,10 @@ export default {
getTrainDicList() {
return new Promise(resolve => {
requestFN(
'/dictionaries/listAllDictToParId',
{
parentId: '052369aa22d242118236cde52d0c67ea'
}
'/industrytype/getIndustryTree',
).then((data) => {
resolve()
this.trainDicList = JSON.parse(data.zTreeNodes)
this.trainDicList = data.zTreeNodes
}).catch((e) => {
this.listLoading = false
})