Merge branch 'develop' of https://gitee.com/siwa-team/dawa-vue into develop
This commit is contained in:
commit
cb34056f4c
|
@ -3,16 +3,18 @@ import request from '@/utils/request'
|
|||
const terminalTrainApi = {
|
||||
edit: '/project/terminal/addOrUpdate',
|
||||
del: '/project/terminal/del',
|
||||
list: '/project/terminal/pageList'
|
||||
list: '/project/terminal/pageList',
|
||||
get: '/project/terminal/get'
|
||||
}
|
||||
|
||||
export function terminalTrainEdit(params) {
|
||||
return request({
|
||||
url: terminalTrainApi.add,
|
||||
url: terminalTrainApi.edit,
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
export function terminalTrainDel (params) {
|
||||
return request({
|
||||
url: terminalTrainApi.del,
|
||||
|
@ -20,6 +22,7 @@ export function terminalTrainDel (params) {
|
|||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
export function terminalTrainList(params) {
|
||||
console.log("terminalTrainList------------{}", params)
|
||||
return request({
|
||||
|
@ -28,3 +31,13 @@ export function terminalTrainList(params) {
|
|||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function terminalTrainGet(params) {
|
||||
console.log("terminalTrainGet------------{}", params)
|
||||
return request({
|
||||
url: terminalTrainApi.get,
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
<template>
|
||||
<a-card :bordered="false" title="终端培训详情">
|
||||
<template slot="extra">
|
||||
<a-button size="small" @click="close">返回</a-button>
|
||||
</template>
|
||||
<a-descriptions title="" layout="horizontal" bordered size="small" :column="1">
|
||||
<a-descriptions-item label="培训名称">{{ detailData.trainName }}</a-descriptions-item>
|
||||
<a-descriptions-item label="培训时间"
|
||||
>{{ detailData.trainSdate }} 至 {{ detailData.trainEdate }}</a-descriptions-item
|
||||
>
|
||||
<a-descriptions-item label="主持人">{{ detailData.host }}</a-descriptions-item>
|
||||
<a-descriptions-item label="会议人数">{{ detailData.personNum }}</a-descriptions-item>
|
||||
<a-descriptions-item label="学习内容">{{ detailData.learningContent }}</a-descriptions-item>
|
||||
<a-descriptions-item label="联系人">{{ detailData.contact }}:{{ detailData.phone }}</a-descriptions-item>
|
||||
<a-descriptions-item label="备注">{{ detailData.remark }}</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<br />
|
||||
<div style="width: 100%; height: 32px; margin-bottom: 8px">
|
||||
<a-button type="primary">修 改 信 息</a-button>
|
||||
<a-button type="primary">会议签到信息</a-button>
|
||||
</div>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { terminalTrainGet } from '@/api/project/terminalTrain'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
terminalTrainGet,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryParam: { id: this.$route.query.terminalTrainId },
|
||||
detailData: {},
|
||||
}
|
||||
},
|
||||
created: function () {
|
||||
let parameter = {}
|
||||
terminalTrainGet(Object.assign(parameter, this.queryParam)).then((res) => {
|
||||
this.detailData = res.data
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.$router.push({
|
||||
path: '/project/project/terminalTrain/list',
|
||||
query: {
|
||||
terminalTrainName: this.$route.query.terminalTrainName,
|
||||
terminalTrainStatus: this.$route.query.terminalTrainStatus,
|
||||
terminalTrainStartDate: this.$route.query.terminalTrainStartDate,
|
||||
terminalTrainEndDate: this.$route.query.terminalTrainEndDate,
|
||||
terminalTrainPageNum: this.$route.query.terminalTrainPageNum,
|
||||
},
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.ant-descriptions-item-label {
|
||||
width: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,96 @@
|
|||
<template>
|
||||
<a-card :bordered="false" :title="titleName">
|
||||
<a-form-model @submit="handleSubmit" :model="form" :label-col="labelCol" :wrapper-col="wrapperCol" layout="horizontal">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="24" :sm="24">
|
||||
<a-form-model-item label="培训名称">
|
||||
<a-input v-model="form.trainName" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="培训时间" style="margin-bottom: 0">
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-date-picker v-model="form.trainSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-date-picker v-model="form.trainEdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="24" :sm="24">
|
||||
<a-form-model-item label="主持人">
|
||||
<a-input v-model="form.host" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :md="24" :sm="24">
|
||||
<a-form-model-item label="会议人数">
|
||||
<a-input-number v-model="form.personNum" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="学习内容">
|
||||
<a-input v-model="form.learningContent" type="textarea" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="12">
|
||||
<a-form-model-item label="联系人">
|
||||
<a-input v-model="form.contact" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="12">
|
||||
<a-form-model-item label="联系方式">
|
||||
<a-input v-model="form.phone" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="备注">
|
||||
<a-input v-model="form.remark" type="textarea" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :wrapper-col="{ span: 14, offset: 4 }">
|
||||
<a-button type="primary" @click="saveTrain"> 保存 </a-button>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
||||
//例如:import 《组件名称》 from '《组件路径》'
|
||||
|
||||
export default {
|
||||
//import引入的组件需要注入到对象中才能使用
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
//这里存放数据
|
||||
return {
|
||||
form: {},
|
||||
titleName: '新增终端培训',
|
||||
}
|
||||
},
|
||||
//计算属性 类似于data概念
|
||||
computed: {},
|
||||
//监控data中的数据变化
|
||||
watch: {},
|
||||
//方法集合
|
||||
methods: {
|
||||
saveTrain() {},
|
||||
},
|
||||
created() {}, //生命周期 - 创建完成(可以访问当前this实例)
|
||||
mounted() {}, //生命周期 - 挂载完成(可以访问DOM元素)
|
||||
beforeCreate() {}, //生命周期 - 创建之前
|
||||
beforeMount() {}, //生命周期 - 挂载之前
|
||||
beforeUpdate() {}, //生命周期 - 更新之前
|
||||
updated() {}, //生命周期 - 更新之后
|
||||
beforeDestroy() {}, //生命周期 - 销毁之前
|
||||
destroyed() {}, //生命周期 - 销毁完成
|
||||
activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
|
@ -11,6 +11,9 @@
|
|||
}
|
||||
"
|
||||
></SearchCom>
|
||||
<a-space class="table-operator" direction="horizontal">
|
||||
<a-button v-if="hasPerm('project:edit')" type="primary" icon="plus" @click="handledCreate">新增项目</a-button>
|
||||
</a-space>
|
||||
</div>
|
||||
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData">
|
||||
<span slot="serial" slot-scope="text, record, index">
|
||||
|
@ -19,10 +22,10 @@
|
|||
<template slot="action" slot-scope="text, record">
|
||||
<a-dropdown
|
||||
v-if="
|
||||
hasPerm('archives:user:autotrain:list') ||
|
||||
hasPerm('archives:user:terminaltrain:list') ||
|
||||
hasPerm('archives:user:selfStudy:list') ||
|
||||
hasPerm('archives:user:violation:list')
|
||||
hasPerm('terminal:train:list') ||
|
||||
hasPerm('terminal:train:edit') ||
|
||||
hasPerm('terminal:train:del') ||
|
||||
hasPerm('terminal:train:release')
|
||||
"
|
||||
>
|
||||
<a class="ant-dropdown-link"
|
||||
|
@ -30,18 +33,22 @@
|
|||
<a-icon type="down" />
|
||||
</a>
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item v-if="hasPerm('archives:user:autotrain:list') || hasPerm('archives:user:terminaltrain:list')">
|
||||
<a href="javascript:;" @click="archivesProject(record)">发布</a>
|
||||
<a-menu-item v-if="hasPerm('terminal:train:release')">
|
||||
<a href="javascript:;" @click="executeRelease(record)">发布</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item v-if="hasPerm('archives:user:selfStudy:list')">
|
||||
<a href="javascript:;" @click="archivesSelfStudy(record)">详情</a>
|
||||
<a-menu-item v-if="hasPerm('terminal:train:list')">
|
||||
<a href="javascript:;" @click="getDetail(record)">详情</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item v-if="hasPerm('archives:user:violation:list')">
|
||||
<a href="javascript:;" @click="archivesViolation(record)">修改</a>
|
||||
<a-menu-item v-if="hasPerm('terminal:train:edit')">
|
||||
<a href="javascript:;" @click="executeEdit(record)">修改</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a-popconfirm title="是否删除?" @confirm="() => delTerminalTrain(record)">
|
||||
<a href="javascript:;">删 除</a>
|
||||
<a-popconfirm
|
||||
v-if="hasPerm('terminal:train:del')"
|
||||
title="是否删除?"
|
||||
@confirm="() => delTerminalTrain(record)"
|
||||
>
|
||||
<a href="javascript:;">删除</a>
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
|
@ -55,20 +62,20 @@
|
|||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
||||
//例如:import 《组件名称》 from '《组件路径》'
|
||||
import { SearchCom, STable } from '@/components'
|
||||
import { terminalTrainList,terminalTrainDel } from '@/api/project/terminalTrain'
|
||||
import { terminalTrainList, terminalTrainDel } from '@/api/project/terminalTrain'
|
||||
|
||||
export default {
|
||||
//import引入的组件需要注入到对象中才能使用
|
||||
components: { SearchCom, STable, terminalTrainList,terminalTrainDel },
|
||||
components: { SearchCom, STable, terminalTrainList, terminalTrainDel },
|
||||
props: {},
|
||||
data() {
|
||||
//这里存放数据
|
||||
return {
|
||||
queryParam: {
|
||||
status: this.$route.query.terminalTrainQueryProjectStatus || null,
|
||||
name: this.$route.query.terminalTrainQueryProjectName || null,
|
||||
startDate: this.$route.query.terminalTrainQueryStartDate || null,
|
||||
endDate: this.$route.query.terminalTrainQueryEndDate || null,
|
||||
status: this.$route.query.terminalTrainStatus || null,
|
||||
name: this.$route.query.terminalTrainName || null,
|
||||
startDate: this.$route.query.terminalTrainStartDate || null,
|
||||
endDate: this.$route.query.terminalTrainEndDate || null,
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
|
@ -117,8 +124,6 @@ export default {
|
|||
],
|
||||
loadData: (parameter) => {
|
||||
return terminalTrainList(Object.assign(parameter, this.queryParam)).then((res) => {
|
||||
const record = {signNum : 20, personNum: 40}
|
||||
console.log(record.signNum + '/' + record.personNum)
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
@ -157,14 +162,63 @@ export default {
|
|||
console.log('handleRefresh', this.queryParam)
|
||||
this.$refs.table.refresh(bool)
|
||||
},
|
||||
delTerminalTrain(record){
|
||||
console.log("delete Id:",record.id)
|
||||
terminalTrainDel({ids:record.id}).then((res => {
|
||||
//删除
|
||||
delTerminalTrain(record) {
|
||||
console.log('delete Id:', record.id)
|
||||
terminalTrainDel({ ids: record.id }).then((res) => {
|
||||
console.log(res)
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
this.$message.info('删除成功')
|
||||
}
|
||||
}))
|
||||
})
|
||||
},
|
||||
//发布项目
|
||||
executeRelease(record) {
|
||||
console.log('发布项目 id:', record.id)
|
||||
},
|
||||
//跳转详情页面
|
||||
getDetail(record) {
|
||||
this.$router.push({
|
||||
path: '/project/terminalTrain/detail',
|
||||
query: {
|
||||
terminalTrainId: record.id,
|
||||
terminalTrainName: this.$route.query.terminalTrainName,
|
||||
terminalTrainStatus: this.$route.query.terminalTrainStatus,
|
||||
terminalTrainStartDate: this.$route.query.terminalTrainStartDate,
|
||||
terminalTrainEndDate: this.$route.query.terminalTrainEndDate,
|
||||
terminalTrainPageNum: this.$route.query.terminalTrainPageNum,
|
||||
},
|
||||
})
|
||||
console.log('跳转详情页面 id:', record.id)
|
||||
},
|
||||
//编辑新增页面
|
||||
executeEdit(record) {
|
||||
this.$router.push({
|
||||
path: '/project/terminalTrain/form',
|
||||
query: {
|
||||
type: 2, //编辑
|
||||
terminalTrainName: this.$route.query.terminalTrainName,
|
||||
terminalTrainStatus: this.$route.query.terminalTrainStatus,
|
||||
terminalTrainStartDate: this.$route.query.terminalTrainStartDate,
|
||||
terminalTrainEndDate: this.$route.query.terminalTrainEndDate,
|
||||
terminalTrainPageNum: this.$route.query.terminalTrainPageNum,
|
||||
},
|
||||
})
|
||||
console.log('编辑 id:', record)
|
||||
},
|
||||
handledCreate() {
|
||||
this.$router.push({
|
||||
path: '/project/terminalTrain/form',
|
||||
query: {
|
||||
type: 1, //新增
|
||||
terminalTrainName: this.$route.query.terminalTrainName,
|
||||
terminalTrainStatus: this.$route.query.terminalTrainStatus,
|
||||
terminalTrainStartDate: this.$route.query.terminalTrainStartDate,
|
||||
terminalTrainEndDate: this.$route.query.terminalTrainEndDate,
|
||||
terminalTrainPageNum: this.$route.query.terminalTrainPageNum,
|
||||
},
|
||||
})
|
||||
console.log('新增')
|
||||
},
|
||||
},
|
||||
created() {}, //生命周期 - 创建完成(可以访问当前this实例)
|
||||
|
|
Loading…
Reference in New Issue