diff --git a/src/api/project/terminalTrain.js b/src/api/project/terminalTrain.js
index df316f2..cd1fc31 100644
--- a/src/api/project/terminalTrain.js
+++ b/src/api/project/terminalTrain.js
@@ -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
+ })
+}
diff --git a/src/views/project/terminalTrain/TerminalTrainDetail.vue b/src/views/project/terminalTrain/TerminalTrainDetail.vue
new file mode 100644
index 0000000..4f8c587
--- /dev/null
+++ b/src/views/project/terminalTrain/TerminalTrainDetail.vue
@@ -0,0 +1,66 @@
+
+
+
+ 返回
+
+
+ {{ detailData.trainName }}
+ {{ detailData.trainSdate }} 至 {{ detailData.trainEdate }}
+ {{ detailData.host }}
+ {{ detailData.personNum }}
+ {{ detailData.learningContent }}
+ {{ detailData.contact }}:{{ detailData.phone }}
+ {{ detailData.remark }}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/project/terminalTrain/TerminalTrainForm.vue b/src/views/project/terminalTrain/TerminalTrainForm.vue
new file mode 100644
index 0000000..2d1379c
--- /dev/null
+++ b/src/views/project/terminalTrain/TerminalTrainForm.vue
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/project/terminalTrain/TerminalTrainList.vue b/src/views/project/terminalTrain/TerminalTrainList.vue
index 26bf0c5..d7b488d 100644
--- a/src/views/project/terminalTrain/TerminalTrainList.vue
+++ b/src/views/project/terminalTrain/TerminalTrainList.vue
@@ -11,6 +11,9 @@
}
"
>
+
+ 新增项目
+
@@ -19,10 +22,10 @@
-
- 发布
+
+ 发布
-
- 详情
+
+ 详情
-
- 修改
+
+ 修改
- delTerminalTrain(record)">
- 删 除
+ delTerminalTrain(record)"
+ >
+ 删除
@@ -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实例)