系统推荐更改
This commit is contained in:
parent
9a0bde409d
commit
08b286976d
|
@ -26,11 +26,11 @@
|
|||
</a-select>
|
||||
|
||||
<a-button type="primary" icon="search" @click="$refs.table.refresh(true)">查询</a-button>
|
||||
<a-button icon="redo" @click="() => (queryParam = {})">重置</a-button>
|
||||
<a-button icon="redo" @click="() => (queryParam.projectName=null,queryParam.status=null,queryParam.status=null,queryParam.startDate=null,queryParam.endDate= null,queryParam.trainWay= null)">重置</a-button>
|
||||
</a-space>
|
||||
<br />
|
||||
<a-space class="table-operator" direction="horizontal">
|
||||
<a-button v-if="hasPerm(power.add)" type="primary" icon="plus" @click="handledCreate">新增项目</a-button>
|
||||
<a-button v-if="hasPerm(power.add) && queryParam.type != 'model' " type="primary" icon="plus" @click="handledCreate">新增项目</a-button>
|
||||
</a-space>
|
||||
|
||||
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData" :pageNum="Number(this.$route.query.projectPageNum) || 1">
|
||||
|
@ -51,6 +51,8 @@
|
|||
<a-popconfirm title="是否删除?" @confirm="() => handleDelete(record)">
|
||||
<a v-if="hasPerm(power.del) && ['1'].includes(record.status)" href="javascript:;">删除</a>
|
||||
</a-popconfirm>
|
||||
<a-divider type="vertical" v-if="queryParam.type == 'model'" />
|
||||
<a v-if="queryParam.type == 'model'" href="javascript:;" @click="handledCreate(record)" >编辑后发布到自主项目</a>
|
||||
</template>
|
||||
</span>
|
||||
</s-table>
|
||||
|
@ -96,7 +98,8 @@ export default {
|
|||
},
|
||||
},
|
||||
{ title: '人数', key: 'personNum', dataIndex: 'personNum', customRender: (text) => text + '人' },
|
||||
{ title: '项目类型', dataIndex: 'trainType', key: 'trainType',customRender: (text, record, index) => {
|
||||
{
|
||||
title: '项目类型', dataIndex: 'trainType', key: 'trainType', customRender: (text, record, index) => {
|
||||
//项目类型
|
||||
if (text == 1) {
|
||||
return '必修课'
|
||||
|
@ -214,18 +217,6 @@ export default {
|
|||
str === 'sys' ? this.power.del = 'project:sys:del' : this.power.del = 'project:del'
|
||||
str === 'sys' ? this.power.edit = 'project:sys:edit' : this.power.edit = 'project:edit'
|
||||
str === 'sys' ? this.power.release = 'project:sys:release' : this.power.release = 'project:release'
|
||||
|
||||
//年度培训权限
|
||||
// str === 'sys' ? this.power.add = 'project:sys:add' : this.power.add = 'project:add'
|
||||
// str === 'sys' ? this.power.del = 'project:sys:del' : this.power.del = 'project:del'
|
||||
// str === 'sys' ? this.power.edit = 'project:sys:edit' : this.power.edit = 'project:edit'
|
||||
// str === 'sys' ? this.power.release = 'project:sys:release' : this.power.release = 'project:release'
|
||||
|
||||
//单位培训权限
|
||||
// str === 'sys' ? this.power.add = 'project:sys:add' : this.power.add = 'project:add'
|
||||
// str === 'sys' ? this.power.del = 'project:sys:del' : this.power.del = 'project:del'
|
||||
// str === 'sys' ? this.power.edit = 'project:sys:edit' : this.power.edit = 'project:edit'
|
||||
// str === 'sys' ? this.power.release = 'project:sys:release' : this.power.release = 'project:release'
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -47,6 +47,8 @@ export default {
|
|||
created() {
|
||||
console.log('分步表单创建完成', this.$route)
|
||||
if(this.$route.query.t === 'self') this.form.projectType = 1;
|
||||
// if(this.$route.query.t === 'year') this.form.projectType = 2;
|
||||
// if(this.$route.query.t === 'unit') this.form.projectType = 3;
|
||||
if(this.$route.query.t === 'year') this.form.projectType = 2;
|
||||
if(this.$route.query.t === 'unit') this.form.projectType = 3;
|
||||
},
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
</a-form-model-item>
|
||||
</a-col> -->
|
||||
<!-- 时间选择器呢 -->
|
||||
<a-col :span="24">
|
||||
<a-col v-if="form.projectType != 0" :span="24">
|
||||
<a-form-model-item v-if="['1', '3' ,'4'].includes(form.trainWay)" label="培训时间" style="margin-bottom: 0">
|
||||
<a-form-model-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }" prop="trainSdate">
|
||||
<a-date-picker v-model="form.trainSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
|
@ -63,7 +63,7 @@
|
|||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 时间选择器 -->
|
||||
<a-col :span="24">
|
||||
<a-col v-if="form.projectType != 0" :span="24">
|
||||
<a-form-model-item v-if="['3', '4'].includes(form.trainWay)" label="练习时间" style="margin-bottom: 0">
|
||||
<a-form-model-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }" prop="practiceSdate">
|
||||
<a-date-picker v-model="form.practiceSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
|
@ -75,7 +75,7 @@
|
|||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 时间选择器 -->
|
||||
<a-col :span="24">
|
||||
<a-col v-if="form.projectType != 0" :span="24">
|
||||
<a-form-model-item v-if="['2', '4'].includes(form.trainWay)" label="考试时间" style="margin-bottom: 0">
|
||||
<a-form-model-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }" prop="examSdate">
|
||||
<a-date-picker v-model="form.examSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
|
@ -88,7 +88,7 @@
|
|||
</a-col>
|
||||
|
||||
<!-- 考试次数 -->
|
||||
<a-col :span="24">
|
||||
<a-col v-if="form.projectType != 0" :span="24">
|
||||
<a-form-model-item v-if="['2', '4'].includes(form.trainWay)" label="考试次数" style="margin-bottom: 0">
|
||||
<a-form-model-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }" prop="examNumber">
|
||||
<a-input-number v-model="form.examNumber" :min="0" style="width: 100%" />
|
||||
|
@ -103,7 +103,7 @@
|
|||
</a-form-model-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24">
|
||||
<a-col v-if="form.projectType != 0" :span="24">
|
||||
<a-form-model-item label="模拟考试" v-if="['2', '4'].includes(form.trainWay)" prop="mockExam">
|
||||
<a-radio-group v-model="form.mockExam">
|
||||
<a-radio value="1"> 允许 </a-radio>
|
||||
|
@ -171,7 +171,12 @@ export default {
|
|||
console.log('第一个表单创建了')
|
||||
if (this.$route.query.projectId) {
|
||||
getProjectDetail({ id: this.$route.query.projectId }).then(res => {
|
||||
this.form = res.data
|
||||
let form = res.data;
|
||||
if(this.$route.query.t == 'model') {
|
||||
console.log('form',form)
|
||||
form.projectType = 1;
|
||||
}
|
||||
this.form = form;
|
||||
this.$emit('setFormType',this.form.trainWay)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue