|
@@ -10,16 +10,11 @@
|
|
|
style="max-width: 700px;"
|
|
style="max-width: 700px;"
|
|
|
>
|
|
>
|
|
|
<el-timeline>
|
|
<el-timeline>
|
|
|
- <el-timeline-item placement="top" size="normal">
|
|
|
|
|
|
|
+ <el-timeline-item placement="top" size="normal" timestamp="基本信息">
|
|
|
<el-card shadow="hover" :body-style="{ padding: '20px' }">
|
|
<el-card shadow="hover" :body-style="{ padding: '20px' }">
|
|
|
<div>
|
|
<div>
|
|
|
<el-form-item prop="year" label="年度">
|
|
<el-form-item prop="year" label="年度">
|
|
|
- <el-select
|
|
|
|
|
- v-model="formData.year"
|
|
|
|
|
- style="width: 300px"
|
|
|
|
|
- @change="getName"
|
|
|
|
|
- :disabled="edit"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-select v-model="formData.year" style="width: 300px" disabled>
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in years"
|
|
v-for="item in years"
|
|
|
:key="item"
|
|
:key="item"
|
|
@@ -29,11 +24,7 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item prop="name" label="名称" v-if="formData.year">
|
|
<el-form-item prop="name" label="名称" v-if="formData.year">
|
|
|
- <el-input
|
|
|
|
|
- v-model="formData.name"
|
|
|
|
|
- :readonly="!display || edit"
|
|
|
|
|
- style="width: 300px"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="formData.name" style="width: 300px" readonly></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="报名起始时间">
|
|
<el-form-item label="报名起始时间">
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
@@ -44,12 +35,12 @@
|
|
|
end-placeholder="请选择结束时间"
|
|
end-placeholder="请选择结束时间"
|
|
|
range-separator="至"
|
|
range-separator="至"
|
|
|
style="width: 300px"
|
|
style="width: 300px"
|
|
|
- :readonly="!display || edit"
|
|
|
|
|
|
|
+ readonly
|
|
|
>
|
|
>
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item prop="online" label="展演形式">
|
|
<el-form-item prop="online" label="展演形式">
|
|
|
- <el-radio-group v-model="formData.online">
|
|
|
|
|
|
|
+ <el-radio-group v-model="formData.online" disabled>
|
|
|
<el-radio :label="true">线上</el-radio>
|
|
<el-radio :label="true">线上</el-radio>
|
|
|
<el-radio :label="false">线下</el-radio>
|
|
<el-radio :label="false">线下</el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
@@ -60,14 +51,14 @@
|
|
|
<!-- content -->
|
|
<!-- content -->
|
|
|
</el-timeline-item>
|
|
</el-timeline-item>
|
|
|
|
|
|
|
|
- <el-timeline-item placement="top" size="normal">
|
|
|
|
|
|
|
+ <el-timeline-item placement="top" size="normal" timestamp="计划安排">
|
|
|
<el-card shadow="hover" :body-style="{ padding: '20px' }">
|
|
<el-card shadow="hover" :body-style="{ padding: '20px' }">
|
|
|
<div v-for="(item, index) in schedules" :key="index">
|
|
<div v-for="(item, index) in schedules" :key="index">
|
|
|
<div v-if="!item.del">
|
|
<div v-if="!item.del">
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="11">
|
|
<el-col :span="11">
|
|
|
<el-form-item prop="content" label="活动内容">
|
|
<el-form-item prop="content" label="活动内容">
|
|
|
- <el-input v-model="item.content"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="item.content" readonly></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="11">
|
|
<el-col :span="11">
|
|
@@ -77,6 +68,7 @@
|
|
|
type="date"
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
|
placeholder="选择日期"
|
|
placeholder="选择日期"
|
|
|
|
|
+ readonly
|
|
|
>
|
|
>
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -85,7 +77,7 @@
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="20">
|
|
<el-col :span="20">
|
|
|
<el-form-item label="活动地点">
|
|
<el-form-item label="活动地点">
|
|
|
- <el-input v-model="item.address"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="item.address" readonly></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
@@ -94,18 +86,18 @@
|
|
|
</el-card>
|
|
</el-card>
|
|
|
</el-timeline-item>
|
|
</el-timeline-item>
|
|
|
|
|
|
|
|
- <el-timeline-item placement="top" size="normal">
|
|
|
|
|
|
|
+ <el-timeline-item placement="top" size="normal" timestamp="咨询电话">
|
|
|
<el-card shadow="hover" :body-style="{ padding: '20px' }">
|
|
<el-card shadow="hover" :body-style="{ padding: '20px' }">
|
|
|
<div v-for="(item, index) in phones" :key="index">
|
|
<div v-for="(item, index) in phones" :key="index">
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="10">
|
|
<el-col :span="10">
|
|
|
<el-form-item label="联系人">
|
|
<el-form-item label="联系人">
|
|
|
- <el-input v-model="item.name"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="item.name" readonly></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="10">
|
|
<el-col :span="10">
|
|
|
<el-form-item label="电话">
|
|
<el-form-item label="电话">
|
|
|
- <el-input v-model="item.phone"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="item.phone" readonly></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
@@ -113,14 +105,14 @@
|
|
|
</el-card>
|
|
</el-card>
|
|
|
</el-timeline-item>
|
|
</el-timeline-item>
|
|
|
|
|
|
|
|
- <el-timeline-item placement="top" size="normal">
|
|
|
|
|
|
|
+ <el-timeline-item placement="top" size="normal" timestamp="其他信息">
|
|
|
<el-card shadow="hover" :body-style="{ padding: '20px' }">
|
|
<el-card shadow="hover" :body-style="{ padding: '20px' }">
|
|
|
<div>
|
|
<div>
|
|
|
<el-form-item prop="email" label="活动邮箱">
|
|
<el-form-item prop="email" label="活动邮箱">
|
|
|
- <el-input v-model="formData.email" style="width: 300px"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="formData.email" style="width: 300px" readonly></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item prop="annex" label="活动方案">
|
|
<el-form-item prop="annex" label="活动方案">
|
|
|
- <file-upload v-model="formData.annex"></file-upload>
|
|
|
|
|
|
|
+ <file-upload v-model="formData.annex" :readonly="true"></file-upload>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item prop="codeImg" label="活动工作群">
|
|
<el-form-item prop="codeImg" label="活动工作群">
|
|
|
<el-image
|
|
<el-image
|
|
@@ -136,11 +128,7 @@
|
|
|
</el-timeline>
|
|
</el-timeline>
|
|
|
|
|
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
- <el-button @click="onSave" :loading="saving" type="primary" v-if="display">保存</el-button>
|
|
|
|
|
- <el-button @click="onDelete" :loading="saving" type="danger" v-if="formData.id && display">
|
|
|
|
|
- 删除
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <el-button @click="$router.go(-1)">取消</el-button>
|
|
|
|
|
|
|
+ <el-button @click="$router.go(-1)">返回</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</div>
|
|
</div>
|
|
@@ -152,12 +140,9 @@ export default {
|
|
|
created() {
|
|
created() {
|
|
|
if (this.$route.query.id) {
|
|
if (this.$route.query.id) {
|
|
|
this.$http
|
|
this.$http
|
|
|
- .get('performance/backGet/' + this.$route.query.id)
|
|
|
|
|
|
|
+ .get('performance/get/' + this.$route.query.id)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
this.formData = res;
|
|
this.formData = res;
|
|
|
- if (res.programmeNum > 0) {
|
|
|
|
|
- this.edit = true;
|
|
|
|
|
- }
|
|
|
|
|
if (typeof res.performanceEnquiries != 'undefined') {
|
|
if (typeof res.performanceEnquiries != 'undefined') {
|
|
|
this.phones = res.performanceEnquiries;
|
|
this.phones = res.performanceEnquiries;
|
|
|
}
|
|
}
|
|
@@ -195,131 +180,16 @@ export default {
|
|
|
years: ['2020', '2021', '2022', '2023', '2024'],
|
|
years: ['2020', '2021', '2022', '2023', '2024'],
|
|
|
schedules: [],
|
|
schedules: [],
|
|
|
phones: [],
|
|
phones: [],
|
|
|
- performanceId: '',
|
|
|
|
|
- edit: false
|
|
|
|
|
|
|
+ performanceId: ''
|
|
|
};
|
|
};
|
|
|
- },
|
|
|
|
|
- computed: {
|
|
|
|
|
- ...mapState(['userInfo']),
|
|
|
|
|
- saveOtherJson() {
|
|
|
|
|
- const schedules = [...this.schedules]
|
|
|
|
|
- .filter(item => {
|
|
|
|
|
- return !!item.content || !!item.date || !!item.address;
|
|
|
|
|
- })
|
|
|
|
|
- .map(item => {
|
|
|
|
|
- return {
|
|
|
|
|
- ...item,
|
|
|
|
|
- performanceId: this.performanceId
|
|
|
|
|
- };
|
|
|
|
|
- });
|
|
|
|
|
- return JSON.stringify(schedules);
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- methods: {
|
|
|
|
|
- onSave() {
|
|
|
|
|
- this.$refs.form.validate(valid => {
|
|
|
|
|
- if (valid) {
|
|
|
|
|
- this.submit();
|
|
|
|
|
- } else {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- submit() {
|
|
|
|
|
- let data = { ...this.formData };
|
|
|
|
|
- data.startDate = this.dateRange[0];
|
|
|
|
|
- data.endDate = this.dateRange[1];
|
|
|
|
|
- data.performanceEnquiries = this.phones;
|
|
|
|
|
- this.saving = true;
|
|
|
|
|
- this.$http
|
|
|
|
|
- .post('/performance/save', data, { body: 'json' })
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- this.saving = false;
|
|
|
|
|
-
|
|
|
|
|
- this.performanceId = res.id;
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- this.$http.post('/performanceSchedule/batchSave', {
|
|
|
|
|
- schedules: this.saveOtherJson
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- this.$message.success('成功');
|
|
|
|
|
- this.$router.go(-1);
|
|
|
|
|
- })
|
|
|
|
|
- .catch(e => {
|
|
|
|
|
- console.log(e);
|
|
|
|
|
- this.saving = false;
|
|
|
|
|
- this.$message.error(e.error);
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- onDelete() {
|
|
|
|
|
- this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
|
|
|
|
|
- .then(() => {
|
|
|
|
|
- return this.$http.post(`/performance/del/${this.formData.id}`);
|
|
|
|
|
- })
|
|
|
|
|
- .then(() => {
|
|
|
|
|
- this.$message.success('删除成功');
|
|
|
|
|
- this.$router.go(-1);
|
|
|
|
|
- })
|
|
|
|
|
- .catch(e => {
|
|
|
|
|
- if (e !== 'cancel') {
|
|
|
|
|
- console.log(e);
|
|
|
|
|
- this.$message.error((e || {}).error || '删除失败');
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- getAdmin() {
|
|
|
|
|
- let data = this.userInfo.authorities;
|
|
|
|
|
- data.forEach(element => {
|
|
|
|
|
- if (element.name === 'ROLE_ADMIN') {
|
|
|
|
|
- this.display = true;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- onAddOtherForm() {
|
|
|
|
|
- this.schedules.push({
|
|
|
|
|
- content: '',
|
|
|
|
|
- date: '',
|
|
|
|
|
- address: ''
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- onAddPhoneForm() {
|
|
|
|
|
- this.phones.push({
|
|
|
|
|
- name: '',
|
|
|
|
|
- phone: ''
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- onDeleteOtherForm(info, index) {
|
|
|
|
|
- this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'warning' })
|
|
|
|
|
- .then(() => {
|
|
|
|
|
- const schedules = [...this.schedules];
|
|
|
|
|
- if (info.id) {
|
|
|
|
|
- info.del = true;
|
|
|
|
|
- schedules[index] = info;
|
|
|
|
|
- } else {
|
|
|
|
|
- schedules.splice(index, 1);
|
|
|
|
|
- }
|
|
|
|
|
- this.schedules = schedules;
|
|
|
|
|
- this.$message.success('删除成功');
|
|
|
|
|
- })
|
|
|
|
|
- .catch(e => {});
|
|
|
|
|
- },
|
|
|
|
|
- onDeletePhoneForm(info, index) {
|
|
|
|
|
- this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'warning' })
|
|
|
|
|
- .then(() => {
|
|
|
|
|
- const phones = [...this.phones];
|
|
|
|
|
- phones.splice(index, 1);
|
|
|
|
|
- this.phones = phones;
|
|
|
|
|
- this.$message.success('删除成功');
|
|
|
|
|
- })
|
|
|
|
|
- .catch(e => {});
|
|
|
|
|
- },
|
|
|
|
|
- getName(value) {
|
|
|
|
|
- this.formData.name = value + '“宁艺之星”社会艺术水平考级展演';
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
|
|
|
+.edit-view {
|
|
|
|
|
+ padding: 0 0;
|
|
|
|
|
+ background-color: transparent;
|
|
|
|
|
+}
|
|
|
.add-con {
|
|
.add-con {
|
|
|
background-color: #f7f7f7;
|
|
background-color: #f7f7f7;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -333,8 +203,7 @@ export default {
|
|
|
background-color: #ffffff;
|
|
background-color: #ffffff;
|
|
|
color: #606266;
|
|
color: #606266;
|
|
|
}
|
|
}
|
|
|
-.edit-view {
|
|
|
|
|
- padding: 0 0;
|
|
|
|
|
- background-color: transparent;
|
|
|
|
|
|
|
+/deep/.el-radio__input.is-disabled + span.el-radio__label {
|
|
|
|
|
+ color: #606266; // #409EFF;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|