Merge branch 'develop' of https://gitee.com/siwa-team/dawa-vue into develop
This commit is contained in:
commit
ce69b05ee5
|
@ -20,7 +20,7 @@ const toast = (msg, description) => {
|
|||
const request = axios.create({
|
||||
// API 请求的默认前缀
|
||||
baseURL: process.env.VUE_APP_API_BASE_URL,
|
||||
timeout: 6000 // 请求超时时间
|
||||
timeout: 60000 // 请求超时时间
|
||||
})
|
||||
|
||||
// 异常拦截处理器
|
||||
|
|
|
@ -74,7 +74,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
// 查询参数
|
||||
queryParam: {},
|
||||
queryParam: this.$route.query.queryParam || {},
|
||||
// 表头
|
||||
columns: [
|
||||
{ title: '序号', key: 'id', dataIndex: 'id', width: 60, scopedSlots: { customRender: 'serial' } },
|
||||
|
|
|
@ -5,17 +5,20 @@
|
|||
<a-step title="基本信息" />
|
||||
<a-step title="选择单位" />
|
||||
<!-- v-if="['2', '3', '4'].includes(form.trainWay)" -->
|
||||
<a-step title="选择课程" />
|
||||
<a-step title="选择人员" />
|
||||
<a-step title="组卷策略" />
|
||||
<a-step title="完成" />
|
||||
<a-step v-if="['2', '3', '4'].includes(form.trainWay)" title="选择课程" />
|
||||
<a-step v-if="['2', '3', '4'].includes(form.trainWay)" title="选择人员" />
|
||||
<a-step v-if="['2', '3', '4'].includes(form.trainWay)" title="组卷策略" />
|
||||
<a-step :title="this.result ? '完成' : '失败'" />
|
||||
</a-steps>
|
||||
<div class="content">
|
||||
<step1 v-bind:form="form" v-if="currentTab === 0" @nextStep="nextStep" />
|
||||
<step2 v-bind:form="form" v-if="currentTab === 1" @nextStep="nextStep" @prevStep="prevStep" />
|
||||
<step3 v-bind:form="form" v-if="currentTab === 2" @nextStep="nextStep" @prevStep="prevStep" />
|
||||
<step4 v-bind:form="form" v-if="currentTab === 3" @nextStep="nextStep" @prevStep="prevStep" />
|
||||
<step5 v-bind:form="form" v-if="currentTab === 4" @prevStep="prevStep" @finish="finish" />
|
||||
<!-- <keep-alive exclude="result"> -->
|
||||
<step1 v-if="currentTab === 0" :projectForm="form" @nextStep="nextStep" />
|
||||
<step2 v-if="currentTab === 1" :projectForm="form" @nextStep="nextStep" @prevStep="prevStep" />
|
||||
<step3 v-if="currentTab === 2" :projectForm="form" @nextStep="nextStep" @prevStep="prevStep" />
|
||||
<step4 v-if="currentTab === 3" :projectForm="form" @nextStep="nextStep" @prevStep="prevStep" />
|
||||
<step5 v-if="currentTab === 4" :projectForm="form" @prevStep="prevStep" @executeSave="executeSave" @executeIssue="executeIssue" />
|
||||
<result v-if="currentTab === 5" :projectForm="form" @prevStep="prevStep" :projectSaveStatus="status" />
|
||||
<!-- </keep-alive> -->
|
||||
</div>
|
||||
</a-card>
|
||||
</template>
|
||||
|
@ -25,6 +28,8 @@ import Step1 from './form/ProjectForm'
|
|||
import Step2 from './form/ProjectUnitSelect'
|
||||
import Step3 from './form/ProjectCourseList'
|
||||
import Step4 from './form/ProjectPersonForm'
|
||||
import step5 from './form/ProjectTestPaperFormationStrategy'
|
||||
import result from './form/Result'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
@ -32,7 +37,16 @@ export default {
|
|||
Step2,
|
||||
Step3,
|
||||
Step4,
|
||||
step5,
|
||||
result,
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)
|
||||
created() {
|
||||
console.log('分步表单创建完成')
|
||||
},
|
||||
destroyed() {
|
||||
console.log('分步表单销毁了。。。。。')
|
||||
}, //生命周期 - 销毁完成
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
|
@ -49,7 +63,11 @@ export default {
|
|||
visible: false,
|
||||
confirmLoading: false,
|
||||
type: '',
|
||||
form: {},
|
||||
form: {
|
||||
trainWay: '1',
|
||||
},
|
||||
result: true,
|
||||
status: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -67,23 +85,44 @@ export default {
|
|||
this.formLoading = false
|
||||
},
|
||||
|
||||
// handler
|
||||
//保存项目
|
||||
executeSave(childValue) {
|
||||
console.log('保存项目', childValue)
|
||||
if (true) {
|
||||
this.status = 'success'
|
||||
this.currentTab = 5
|
||||
}
|
||||
},
|
||||
|
||||
//保存并发布项目
|
||||
executeIssue(childValue) {
|
||||
console.log('保存并发布项目', childValue)
|
||||
if (true) {
|
||||
this.status = 'error'
|
||||
this.currentTab = 5
|
||||
this.result = false
|
||||
}
|
||||
},
|
||||
|
||||
//下一步
|
||||
nextStep(childValue) {
|
||||
console.log('进入下一步', childValue)
|
||||
if (this.currentTab < 5) {
|
||||
this.form = childValue;
|
||||
this.form = childValue
|
||||
this.currentTab += 1
|
||||
}
|
||||
console.log('ProjectStepForm表单数据', this.form)
|
||||
},
|
||||
//上一步
|
||||
prevStep(childValue) {
|
||||
console.log('返回上一步',childValue)
|
||||
console.log('返回上一步', childValue)
|
||||
if (this.currentTab > 0) {
|
||||
this.form = childValue
|
||||
this.currentTab -= 1
|
||||
}
|
||||
console.log('ProjectStepForm表单数据', this.form)
|
||||
},
|
||||
|
||||
finish() {
|
||||
this.currentTab = 0
|
||||
},
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData" :showPagination="false">
|
||||
<span slot="serial" slot-scope="text, record, index">
|
||||
{{ index + 1 }}
|
||||
{{ index + 1 }}
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<template>
|
||||
|
@ -60,11 +60,15 @@ export default {
|
|||
STable,
|
||||
ProjectCourseSelect,
|
||||
},
|
||||
props: {},
|
||||
props: {
|
||||
projectForm: {
|
||||
type: Object,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
//这里存放数据
|
||||
return {
|
||||
form: {},
|
||||
form: this.projectForm,
|
||||
labelCol: {},
|
||||
wrapperCol: {},
|
||||
vertical: 'vertical',
|
||||
|
@ -93,6 +97,7 @@ export default {
|
|||
} else {
|
||||
/** 新建的没有项目id,传当前的所选的课程id */
|
||||
return getCourseListByCourseIds(Object.assign(parameter, this.queryParam)).then((res) => {
|
||||
|
||||
return res.data
|
||||
})
|
||||
}
|
||||
|
@ -105,14 +110,37 @@ export default {
|
|||
watch: {},
|
||||
//方法集合
|
||||
methods: {
|
||||
//下一步
|
||||
toNext() {
|
||||
this.form.lessonIds = []
|
||||
let ids = this.queryParam.ids.split(',')
|
||||
ids.forEach((id, index, arr) => {
|
||||
console.log('id-----------------------',id)
|
||||
this.form.lessonIds.push({ ids: id, sort: index })
|
||||
})
|
||||
|
||||
console.log('ProjectCourseSelect-toNext', this.form)
|
||||
this.$emit('nextStep')
|
||||
this.$emit('nextStep',this.form)
|
||||
},
|
||||
//上一步
|
||||
toPrep() {
|
||||
this.form.lessonIds = []
|
||||
let ids = this.queryParam.ids.split(',')
|
||||
ids.forEach((id, index, arr) => {
|
||||
this.form.lessonIds.push({ ids: id, sort: index })
|
||||
})
|
||||
|
||||
console.log('toPrep', this.form)
|
||||
this.$emit('prevStep', this.form)
|
||||
},
|
||||
//初始化ids
|
||||
initIds(){
|
||||
let str = this.projectForm.lessonIds.join(',')
|
||||
console.log('initIds',str)
|
||||
if(str){
|
||||
this.queryParam.ids = str
|
||||
}
|
||||
},
|
||||
/**查询了列表数据 */
|
||||
getProjectCourseList() {
|
||||
// if (this.$route.query.projectId) {
|
||||
|
@ -138,7 +166,7 @@ export default {
|
|||
|
||||
//生命周期 - 创建完成(可以访问当前this实例)
|
||||
created() {
|
||||
// this.getProjectCourseList()
|
||||
this.initIds()
|
||||
},
|
||||
mounted() {}, //生命周期 - 挂载完成(可以访问DOM元素)
|
||||
beforeCreate() {}, //生命周期 - 创建之前
|
||||
|
|
|
@ -126,10 +126,9 @@ import { classList } from '@/api/project/class'
|
|||
|
||||
export default {
|
||||
props: {
|
||||
// form: {
|
||||
// type: Object,
|
||||
// default: () => ({}),
|
||||
// },
|
||||
projectForm: {
|
||||
type: Object,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -140,7 +139,7 @@ export default {
|
|||
visible: false,
|
||||
confirmLoading: false,
|
||||
trainClass: [],
|
||||
form: {},
|
||||
form: this.projectForm,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
|
|
@ -1,50 +1,219 @@
|
|||
<template>
|
||||
<a-form-model :model="form" :label-col="labelCol" :wrapper-col="wrapperCol" layout="horizontal">
|
||||
<div>
|
||||
<a-row type="flex" justify="center" align="top">
|
||||
<a-col :span="4" id="tree">
|
||||
<a-tree>
|
||||
|
||||
<div>
|
||||
<a-row type="flex" justify="center" align="top">
|
||||
<a-col :span="4" id="tree">
|
||||
<a-page-header title="单位列表" sub-title="" />
|
||||
<div v-if="this.orgTree != ''">
|
||||
<a-tree
|
||||
:treeData="orgTree"
|
||||
v-if="orgTree.length"
|
||||
@select="onSelect"
|
||||
:defaultExpandAll="true"
|
||||
:defaultExpandedKeys="defaultExpandedKeys"
|
||||
:replaceFields="replaceFields"
|
||||
>
|
||||
<a-icon slot="switcherIcon" type="down" />
|
||||
</a-tree>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="20" id="content">
|
||||
<a-page-header title="人员选择" sub-title="" />
|
||||
<a-col :span="18" id="table">
|
||||
<a-form layout="inline">
|
||||
<a-row>
|
||||
<a-form-item label="姓名">
|
||||
<a-input v-model="queryParam.name" placeholder="请输入姓名" />
|
||||
</a-form-item>
|
||||
<a-form-item label="人员类型">
|
||||
<a-select default-value="0" style="width: 120px">
|
||||
<a-select-option value="0"> - 全 部 - </a-select-option>
|
||||
<a-select-option value="1"> 类 型 一 </a-select-option>
|
||||
<a-select-option value="2"> 类 型 二 </a-select-option>
|
||||
<a-select-option value="3"> 类 型 三 </a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
||||
<a-button style="margin-left: 8px" @click="() => (queryParam = {})">重置</a-button>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<s-table
|
||||
ref="table"
|
||||
:columns="columns"
|
||||
:data="loadData"
|
||||
:rowKey="(record) => record.id"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, selectedRows: selectedRows, onChange: onSelectChange }"
|
||||
>
|
||||
<span slot="serial" slot-scope="text, record, index">
|
||||
{{ index + 1 }}
|
||||
</span>
|
||||
</s-table>
|
||||
</a-col>
|
||||
<a-col :span="20" id="content">
|
||||
<h1>人员选择</h1>
|
||||
<a-col :span="6" id="select">
|
||||
<p>点击列表项取消选择或【<a @click="removeAllSelece">清空所有</a>】</p>
|
||||
<a-list size="small" :data-source="selectedRows" :rowKey="(item) => item.id">
|
||||
<a-list-item slot="renderItem" slot-scope="item" @click="changeList({ item })">
|
||||
{{ item.name + '(' + item.userName + ')' }}
|
||||
</a-list-item>
|
||||
</a-list>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-button type="primary" @click="toNext">下一步</a-button>
|
||||
<a-button type="primary" @click="toPrev">上一步</a-button>
|
||||
</div>
|
||||
</a-form-model>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-button type="primary" @click="toNext">下一步</a-button>
|
||||
<a-button type="primary" @click="toPrev">上一步</a-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
||||
// 例如:import 《组件名称》 from '《组件路径》'
|
||||
import { orgList } from '@/api/org/org'
|
||||
import { listToTree } from '@/utils/util'
|
||||
import { personPage } from '@/api/person/person'
|
||||
import { STable } from '@/components'
|
||||
const rootParentId = 0
|
||||
|
||||
export default {
|
||||
// import引入的组件需要注入到对象中才能使用
|
||||
components: {},
|
||||
props: {},
|
||||
components: {
|
||||
orgList,
|
||||
STable,
|
||||
},
|
||||
props: {
|
||||
projectForm: {
|
||||
type: Object,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
// 这里存放数据
|
||||
return {}
|
||||
return {
|
||||
form: this.projectForm,
|
||||
// 查询参数
|
||||
queryParam: { orgType: 1 },
|
||||
replaceFields: { children: 'children', title: 'name', key: 'id', value: 'id' },
|
||||
expandedKeys: [],
|
||||
autoExpandParent: true,
|
||||
defaultExpandedKeys: [],
|
||||
selectedRowKeys: [],
|
||||
selectedRows: [],
|
||||
orgTree: [],
|
||||
orgId: '',
|
||||
orgType: 1,
|
||||
columns: [
|
||||
{ title: '序号', key: 'id', dataIndex: 'id', width: 60, scopedSlots: { customRender: 'serial' } },
|
||||
{ title: '姓名', dataIndex: 'name' },
|
||||
{ title: '用户名', dataIndex: 'userName' },
|
||||
],
|
||||
//人员列表数据
|
||||
loadData: (parameter) => {
|
||||
return personPage(Object.assign(parameter, this.queryParam)).then((res) => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
}
|
||||
},
|
||||
// 计算属性 类似于data概念
|
||||
computed: {},
|
||||
computed: {
|
||||
hasSelected() {
|
||||
return this.selectedRowKeys.length > 0
|
||||
},
|
||||
},
|
||||
// 监控data中的数据变化
|
||||
watch: {},
|
||||
// 方法集合
|
||||
methods: {
|
||||
//下一步
|
||||
toNext() {
|
||||
this.$emit('nextStep')
|
||||
this.form.personIds = this.selectedRowKeys
|
||||
this.$emit('nextStep',this.form)
|
||||
},
|
||||
//上一步
|
||||
toPrev() {
|
||||
this.$emit('prevStep')
|
||||
this.form.personIds = this.selectedRowKeys
|
||||
this.$emit('prevStep',this.form)
|
||||
},
|
||||
|
||||
/** 表格行选中后触发 */
|
||||
onSelectChange(selectedRowKeys, selectedRows) {
|
||||
console.log('selectedRowKeys changed: ', selectedRowKeys)
|
||||
console.log('选择的表格数据 : ', selectedRows)
|
||||
this.selectedRowKeys = this.uniqueKeys([...this.selectedRowKeys, ...selectedRowKeys])
|
||||
this.selectedRows = this.unique([...this.selectedRows, ...selectedRows])
|
||||
},
|
||||
|
||||
//对象去重
|
||||
unique(arr) {
|
||||
const res = new Map()
|
||||
return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
|
||||
},
|
||||
|
||||
//key去重
|
||||
uniqueKeys(arr) {
|
||||
const res = new Map()
|
||||
return arr.filter((arr) => !res.has(arr) && res.set(arr, 1))
|
||||
},
|
||||
|
||||
//列表点击删除列表项
|
||||
changeList(item) {
|
||||
console.log('列表点击删除列表项 : ', item)
|
||||
this.selectedRows = this.selectedRows.filter(function (i) {
|
||||
return i.id != item.item.id
|
||||
})
|
||||
this.selectedRowKeys = this.selectedRowKeys.filter(function (i) {
|
||||
return i != item.item.id
|
||||
})
|
||||
},
|
||||
|
||||
//清空选择
|
||||
removeAllSelece() {
|
||||
this.selectedRowKeys = []
|
||||
this.selectedRows = []
|
||||
},
|
||||
|
||||
//选中后触发
|
||||
onSelect(selectedKey, info) {
|
||||
console.log('selected', selectedKey, info)
|
||||
this.queryParam.orgId = selectedKey.toString()
|
||||
this.orgId = selectedKey.toString()
|
||||
this.$refs.table.refresh(true)
|
||||
},
|
||||
|
||||
//树使用的方法
|
||||
onExpand(expandedKeys) {
|
||||
this.expandedKeys = expandedKeys
|
||||
this.autoExpandParent = false
|
||||
},
|
||||
|
||||
//编辑时初始化人员列表初始化
|
||||
initPersonList(){
|
||||
if(this.form.personIds){
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取到机构树,展开顶级下树节点,考虑到后期数据量变大,不建议全部展开
|
||||
*/
|
||||
async getOrgTree() {
|
||||
await orgList({ orgType: this.orgType }).then((res) => {
|
||||
this.treeLoading = false
|
||||
if (!res.code === 200 || !res.data.length) {
|
||||
return
|
||||
}
|
||||
this.defaultExpandedKeys = []
|
||||
this.orgTree = listToTree(res.data, [], rootParentId)
|
||||
this.orgId = this.orgTree[0].id
|
||||
for (var item of this.orgTree) {
|
||||
if (item.pid === 0) {
|
||||
this.defaultExpandedKeys.push(item.id)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
// 生命周期 - 创建完成(可以访问当前this实例)
|
||||
created() {},
|
||||
created() {
|
||||
this.getOrgTree()
|
||||
},
|
||||
// 生命周期 - 挂载完成(可以访问DOM元素)
|
||||
mounted() {},
|
||||
// 生命周期 - 创建之前
|
||||
|
@ -64,7 +233,7 @@ export default {
|
|||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
#tree {
|
||||
/* #tree {
|
||||
height: 750px;
|
||||
background-color: beige;
|
||||
}
|
||||
|
@ -72,6 +241,6 @@ export default {
|
|||
#content {
|
||||
height: 750px;
|
||||
background-color: bisque;
|
||||
}
|
||||
} */
|
||||
/* /project/form/ProjectPersonForm.vue */
|
||||
</style>
|
|
@ -0,0 +1,68 @@
|
|||
<template>
|
||||
<div>
|
||||
<a-card :bordered="false">
|
||||
<p>hahahahhahahahahhahahah</p>
|
||||
</a-card>
|
||||
|
||||
<a-card :bordered="false">
|
||||
<p>ppppppsdapppsdapppp</p>
|
||||
</a-card>
|
||||
<a-button type="primary" @click="toSave">保 存</a-button>
|
||||
<a-button type="primary" @click="toIssue">发 布</a-button>
|
||||
<a-button type="primary" @click="toPrev">上一步</a-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
||||
// 例如:import 《组件名称》 from '《组件路径》'
|
||||
|
||||
export default {
|
||||
// import引入的组件需要注入到对象中才能使用
|
||||
components: {},
|
||||
props: {
|
||||
projectForm: {
|
||||
type: Object,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
// 这里存放数据
|
||||
return {
|
||||
form: this.projectForm,
|
||||
}
|
||||
},
|
||||
// 计算属性 类似于data概念
|
||||
computed: {},
|
||||
// 监控data中的数据变化
|
||||
watch: {},
|
||||
// 方法集合
|
||||
methods: {
|
||||
//保存
|
||||
toSave() { this.$emit('executeSave'), this.form },
|
||||
//发布
|
||||
toIssue(){ this.$emit("executeIssue"), this.form },
|
||||
//上一步
|
||||
toPrev() { this.$emit('prevStep'), this.form },
|
||||
},
|
||||
// 生命周期 - 创建完成(可以访问当前this实例)
|
||||
created() {},
|
||||
// 生命周期 - 挂载完成(可以访问DOM元素)
|
||||
mounted() {},
|
||||
// 生命周期 - 创建之前
|
||||
beforeCreate() {},
|
||||
// 生命周期 - 挂载之前
|
||||
beforeMount() {},
|
||||
// 生命周期 - 更新之前
|
||||
beforeUpdate() {},
|
||||
// 生命周期 - 更新之后
|
||||
updated() {},
|
||||
// 生命周期 - 销毁之前
|
||||
beforeDestroy() {},
|
||||
// 生命周期 - 销毁完成
|
||||
destroyed() {},
|
||||
// 如果页面有keep-alive缓存功能,这个函数会触发
|
||||
activated() {},
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
|
@ -107,13 +107,13 @@ function handleTreeData(data, targetKeys = []) {
|
|||
|
||||
export default {
|
||||
props: {
|
||||
form:{
|
||||
projectForm: {
|
||||
type: Object,
|
||||
default: ()=>({}),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: this.projectForm,
|
||||
targetKeys: [],
|
||||
dataSource: transferDataSource,
|
||||
|
||||
|
@ -127,7 +127,7 @@ export default {
|
|||
},
|
||||
}
|
||||
},
|
||||
created(){
|
||||
created() {
|
||||
console.log('第2个表单创建了')
|
||||
},
|
||||
computed: {
|
||||
|
@ -137,8 +137,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
toNext() {
|
||||
this.form.unitIds = this.targetKeys
|
||||
console.log('toNext', this.form)
|
||||
this.$emit('nextStep',this.form)
|
||||
this.$emit('nextStep', this.form)
|
||||
// const {
|
||||
// form: { validateFields },
|
||||
// } = this
|
||||
|
@ -150,6 +151,7 @@ export default {
|
|||
// })
|
||||
},
|
||||
toPrep() {
|
||||
this.form.unitIds = this.targetKeys
|
||||
console.log('toPrep', this.form)
|
||||
this.$emit('prevStep', this.form)
|
||||
},
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
<template>
|
||||
<a-result :status="projectSaveStatus" :title="projectSaveStatus" :sub-title="description">
|
||||
<template #extra>
|
||||
<a-button type="primary" @click="toPrev">返回修改</a-button>
|
||||
<a-button type="primary" @click="toProjectList">去列表页</a-button>
|
||||
</template>
|
||||
</a-result>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
||||
// 例如:import 《组件名称》 from '《组件路径》'
|
||||
|
||||
export default {
|
||||
// import引入的组件需要注入到对象中才能使用
|
||||
components: {},
|
||||
props: {
|
||||
projectSaveStatus: {
|
||||
type: String,
|
||||
default: 'success',
|
||||
},
|
||||
projectForm: {
|
||||
type: Object,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
// 这里存放数据
|
||||
return {
|
||||
// status: 'success',
|
||||
// title: '项目保存',
|
||||
form: this.projectForm,
|
||||
description: '请返回列表中查看',
|
||||
}
|
||||
},
|
||||
// 计算属性 类似于data概念
|
||||
computed: {},
|
||||
// 监控data中的数据变化
|
||||
watch: {},
|
||||
// 方法集合
|
||||
methods: {
|
||||
toPrev() {
|
||||
// this.$emit('prevStep',this.selectedRowKeys)
|
||||
console.log('结果页返回修改')
|
||||
this.$emit('prevStep', this.form)
|
||||
},
|
||||
toProjectList() {
|
||||
this.$router.push({
|
||||
path: '/project/list',
|
||||
query: { projectPageNum: 1 },
|
||||
})
|
||||
},
|
||||
},
|
||||
// 生命周期 - 创建完成(可以访问当前this实例)
|
||||
created() {},
|
||||
// 生命周期 - 挂载完成(可以访问DOM元素)
|
||||
mounted() {},
|
||||
// 生命周期 - 创建之前
|
||||
beforeCreate() {},
|
||||
// 生命周期 - 挂载之前
|
||||
beforeMount() {},
|
||||
// 生命周期 - 更新之前
|
||||
beforeUpdate() {},
|
||||
// 生命周期 - 更新之后
|
||||
updated() {},
|
||||
// 生命周期 - 销毁之前
|
||||
beforeDestroy() {},
|
||||
// 生命周期 - 销毁完成
|
||||
destroyed() {},
|
||||
// 如果页面有keep-alive缓存功能,这个函数会触发
|
||||
activated() {},
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
Loading…
Reference in New Issue