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 = {
|
const terminalTrainApi = {
|
||||||
edit: '/project/terminal/addOrUpdate',
|
edit: '/project/terminal/addOrUpdate',
|
||||||
del: '/project/terminal/del',
|
del: '/project/terminal/del',
|
||||||
list: '/project/terminal/pageList'
|
list: '/project/terminal/pageList',
|
||||||
|
get: '/project/terminal/get'
|
||||||
}
|
}
|
||||||
|
|
||||||
export function terminalTrainEdit(params) {
|
export function terminalTrainEdit(params) {
|
||||||
return request({
|
return request({
|
||||||
url: terminalTrainApi.add,
|
url: terminalTrainApi.edit,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function terminalTrainDel (params) {
|
export function terminalTrainDel (params) {
|
||||||
return request({
|
return request({
|
||||||
url: terminalTrainApi.del,
|
url: terminalTrainApi.del,
|
||||||
|
@ -20,6 +22,7 @@ export function terminalTrainDel (params) {
|
||||||
params: params
|
params: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function terminalTrainList(params) {
|
export function terminalTrainList(params) {
|
||||||
console.log("terminalTrainList------------{}", params)
|
console.log("terminalTrainList------------{}", params)
|
||||||
return request({
|
return request({
|
||||||
|
@ -28,3 +31,13 @@ export function terminalTrainList(params) {
|
||||||
params: 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>
|
></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>
|
</div>
|
||||||
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData">
|
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData">
|
||||||
<span slot="serial" slot-scope="text, record, index">
|
<span slot="serial" slot-scope="text, record, index">
|
||||||
|
@ -19,10 +22,10 @@
|
||||||
<template slot="action" slot-scope="text, record">
|
<template slot="action" slot-scope="text, record">
|
||||||
<a-dropdown
|
<a-dropdown
|
||||||
v-if="
|
v-if="
|
||||||
hasPerm('archives:user:autotrain:list') ||
|
hasPerm('terminal:train:list') ||
|
||||||
hasPerm('archives:user:terminaltrain:list') ||
|
hasPerm('terminal:train:edit') ||
|
||||||
hasPerm('archives:user:selfStudy:list') ||
|
hasPerm('terminal:train:del') ||
|
||||||
hasPerm('archives:user:violation:list')
|
hasPerm('terminal:train:release')
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<a class="ant-dropdown-link"
|
<a class="ant-dropdown-link"
|
||||||
|
@ -30,17 +33,21 @@
|
||||||
<a-icon type="down" />
|
<a-icon type="down" />
|
||||||
</a>
|
</a>
|
||||||
<a-menu slot="overlay">
|
<a-menu slot="overlay">
|
||||||
<a-menu-item v-if="hasPerm('archives:user:autotrain:list') || hasPerm('archives:user:terminaltrain:list')">
|
<a-menu-item v-if="hasPerm('terminal:train:release')">
|
||||||
<a href="javascript:;" @click="archivesProject(record)">发布</a>
|
<a href="javascript:;" @click="executeRelease(record)">发布</a>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item v-if="hasPerm('archives:user:selfStudy:list')">
|
<a-menu-item v-if="hasPerm('terminal:train:list')">
|
||||||
<a href="javascript:;" @click="archivesSelfStudy(record)">详情</a>
|
<a href="javascript:;" @click="getDetail(record)">详情</a>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item v-if="hasPerm('archives:user:violation:list')">
|
<a-menu-item v-if="hasPerm('terminal:train:edit')">
|
||||||
<a href="javascript:;" @click="archivesViolation(record)">修改</a>
|
<a href="javascript:;" @click="executeEdit(record)">修改</a>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item>
|
<a-menu-item>
|
||||||
<a-popconfirm title="是否删除?" @confirm="() => delTerminalTrain(record)">
|
<a-popconfirm
|
||||||
|
v-if="hasPerm('terminal:train:del')"
|
||||||
|
title="是否删除?"
|
||||||
|
@confirm="() => delTerminalTrain(record)"
|
||||||
|
>
|
||||||
<a href="javascript:;">删除</a>
|
<a href="javascript:;">删除</a>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
|
@ -65,10 +72,10 @@ export default {
|
||||||
//这里存放数据
|
//这里存放数据
|
||||||
return {
|
return {
|
||||||
queryParam: {
|
queryParam: {
|
||||||
status: this.$route.query.terminalTrainQueryProjectStatus || null,
|
status: this.$route.query.terminalTrainStatus || null,
|
||||||
name: this.$route.query.terminalTrainQueryProjectName || null,
|
name: this.$route.query.terminalTrainName || null,
|
||||||
startDate: this.$route.query.terminalTrainQueryStartDate || null,
|
startDate: this.$route.query.terminalTrainStartDate || null,
|
||||||
endDate: this.$route.query.terminalTrainQueryEndDate || null,
|
endDate: this.$route.query.terminalTrainEndDate || null,
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
|
@ -117,8 +124,6 @@ export default {
|
||||||
],
|
],
|
||||||
loadData: (parameter) => {
|
loadData: (parameter) => {
|
||||||
return terminalTrainList(Object.assign(parameter, this.queryParam)).then((res) => {
|
return terminalTrainList(Object.assign(parameter, this.queryParam)).then((res) => {
|
||||||
const record = {signNum : 20, personNum: 40}
|
|
||||||
console.log(record.signNum + '/' + record.personNum)
|
|
||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -157,14 +162,63 @@ export default {
|
||||||
console.log('handleRefresh', this.queryParam)
|
console.log('handleRefresh', this.queryParam)
|
||||||
this.$refs.table.refresh(bool)
|
this.$refs.table.refresh(bool)
|
||||||
},
|
},
|
||||||
|
//删除
|
||||||
delTerminalTrain(record) {
|
delTerminalTrain(record) {
|
||||||
console.log("delete Id:",record.id)
|
console.log('delete Id:', record.id)
|
||||||
terminalTrainDel({ids:record.id}).then((res => {
|
terminalTrainDel({ ids: record.id }).then((res) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.$message.info('删除成功')
|
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实例)
|
created() {}, //生命周期 - 创建完成(可以访问当前this实例)
|
||||||
|
|
Loading…
Reference in New Issue