<template> <el-form ref="userRefForm" :model="activityQuery" label-width="10%" :rules="activityRules"> <el-form-item label="负责人:" prop="loginAct"> <el-select v-model="activityQuery.ownerId" placeholder="请选择" clearable @click="loadOwner()"> <el-option v-for="item in owners" :key="item.id" :label="item.name" :value="item.id" /> </el-select> </el-form-item> <el-form-item label="活动名称:"> <el-input v-model="activityQuery.name"/> </el-form-item> <el-form-item label="开始时间:"> <el-date-picker v-model="activityQuery.createTime" type="datetime" placeholder="请选择创建时间" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%;" /> </el-form-item> <el-form-item label="结束时间:"> <el-date-picker v-model="activityQuery.endTime" type="datetime" placeholder="请选择创建时间" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%;" /> </el-form-item> <el-form-item label="活动预算:"> <el-input v-model="activityQuery.cost"/> </el-form-item> <el-form-item label="活动描述:"> <el-input v-model="textarea" :rows="6" type="textarea" placeholder="请输入活动描述" /> </el-form-item> <el-form-item label="活动描述:"> <el-button type="primary" @click="submit()">提交</el-button> <el-button @click="goBack()">返回</el-button> </el-form-item> </el-form> </template> <script> import { doGet } from '../http/httpRequest.js'; import { messageTip } from '../util/util.js'; export default { name:"activityRecordView", data(){ return { owners : [], activityQuery : {} } }, mounted(){ this.loadOwner(); }, methods : { loadOwner(){ doGet("/api/user/activityOwner",{}).then(resp => { if(resp.data.code === 200){ this.owners = resp.data.data; } else{ messageTip("网络错误","error"); } }); }, goBack(){ messageTip("返回成功","su***ess"); this.$router.back(); } } } </script> <style scoped> .width{ width: 100%; } </style>
<template>
<el-form ref="userRefForm" :model="activityQuery" label-width="10%" :rules="activityRules">
<el-form-item label="负责人:" prop="loginAct">
<el-select v-model="activityQuery.ownerId" placeholder="请选择" clearable @click="loadOwner()">
<el-option
v-for="item in owners"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="活动名称:">
<el-input v-model="activityQuery.name"/>
</el-form-item>
<el-form-item label="开始时间:">
<el-date-picker
v-model="activityQuery.createTime"
type="datetime"
placeholder="请选择创建时间"
value-format="YYYY-MM-DD HH:mm:ss"
style="width: 100%;"
/>
</el-form-item>
<el-form-item label="结束时间:">
<el-date-picker
v-model="activityQuery.endTime"
type="datetime"
placeholder="请选择创建时间"
value-format="YYYY-MM-DD HH:mm:ss"
style="width: 100%;"
/>
</el-form-item>
<el-form-item label="活动预算:">
<el-input v-model="activityQuery.cost"/>
</el-form-item>
<el-form-item label="活动描述:">
<el-input
v-model="textarea"
:rows="6"
type="textarea"
placeholder="请输入活动描述"
/>
</el-form-item>
<el-form-item label="活动描述:">
<el-button type="primary" @click="submit()">提交</el-button>
<el-button @click="goBack()">返回</el-button>
</el-form-item>
</el-form>
</template>
<script>
import { doGet } from '../http/httpRequest.js';
import { messageTip } from '../util/util.js';
export default {
name:"activityRecordView",
data(){
return {
owners : [],
activityQuery : {}
}
},
mounted(){
this.loadOwner();
},
methods : {
loadOwner(){
doGet("/api/user/activityOwner",{}).then(resp => {
if(resp.data.code === 200){
this.owners = resp.data.data;
}
else{
messageTip("网络错误","error");
}
});
},
goBack(){
messageTip("返回成功","su***ess");
this.$router.back();
}
}
}
</script>
<style scoped>
.width{
width: 100%;
}
</style>