教培功能bug
parent
23ed3b63a1
commit
80ab578870
|
@ -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{
|
||||
|
|
|
@ -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 = ''
|
||||
|
|
|
@ -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
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue