|
@@ -13,10 +13,13 @@
|
|
<el-header height="90px;">
|
|
<el-header height="90px;">
|
|
{{detail.name}}
|
|
{{detail.name}}
|
|
<el-button type="text" @click="editDetail(0)" icon="el-icon-edit" class="agencyHead_edit"></el-button>
|
|
<el-button type="text" @click="editDetail(0)" icon="el-icon-edit" class="agencyHead_edit"></el-button>
|
|
- <el-button type="text" @click="backToList" class="agencyHead_back"><i class="iconfont iconfanhui1"></i></el-button>
|
|
|
|
|
|
+ <el-button v-if="$route.params.id!=null" type="text" @click="backToList" class="agencyHead_back"><i class="iconfont iconfanhui1"></i></el-button>
|
|
</el-header>
|
|
</el-header>
|
|
<el-footer>
|
|
<el-footer>
|
|
- <span class="info">{{detail.headIntroduction==null?"暂无简介":detail.headIntroduction}}</span>
|
|
|
|
|
|
+ <span v-for="item in detail.tags" style="margin-right:10px;">
|
|
|
|
+ <el-tag>{{item}}</el-tag>
|
|
|
|
+ </span>
|
|
|
|
+ <!-- <span class="info">{{detail.headIntroduction==null?"暂无标签":detail.headIntroduction}}</span> -->
|
|
</el-footer>
|
|
</el-footer>
|
|
</el-container>
|
|
</el-container>
|
|
</el-container>
|
|
</el-container>
|
|
@@ -35,7 +38,7 @@
|
|
:on-error="handleUploadError">
|
|
:on-error="handleUploadError">
|
|
<i slot="default" class="el-icon-plus"></i>
|
|
<i slot="default" class="el-icon-plus"></i>
|
|
<div slot="file" slot-scope="{file}">
|
|
<div slot="file" slot-scope="{file}">
|
|
- <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
|
|
|
|
|
|
+ <img class="el-upload-list__item-thumbnail" :src="file.picUrl" alt="">
|
|
<span class="el-upload-list__item-actions">
|
|
<span class="el-upload-list__item-actions">
|
|
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
|
|
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
|
|
<i class="el-icon-zoom-in"></i>
|
|
<i class="el-icon-zoom-in"></i>
|
|
@@ -59,7 +62,9 @@
|
|
<el-col :span="24" class="agencyBody_main">
|
|
<el-col :span="24" class="agencyBody_main">
|
|
<el-col :span="24" class="agencyBody_detail">
|
|
<el-col :span="24" class="agencyBody_detail">
|
|
上课时间:
|
|
上课时间:
|
|
- <span class="info" v-if="detail.amTime != null || detail.pmTime != null">{{detail.amTime}} - {{detail.pmTime}}</span>
|
|
|
|
|
|
+ <span class="info" v-if="detail.amTime != null || detail.pmTime != null">
|
|
|
|
+ 上午:{{detail.amTime}} 下午:{{detail.pmTime}}
|
|
|
|
+ </span>
|
|
<span class="info" v-else>暂无</span>
|
|
<span class="info" v-else>暂无</span>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="agencyBody_detail">
|
|
<el-col :span="24" class="agencyBody_detail">
|
|
@@ -108,8 +113,13 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
- <el-form-item label="机构简介">
|
|
|
|
- <el-input v-model="editForm.headIntroduction" type="textarea" :rows="5" placeholder="请输入机构简介"></el-input>
|
|
|
|
|
|
+ <el-form-item label="机构标签">
|
|
|
|
+ <el-tag :key="tag" v-for="tag in editForm.headIntroduction" closable :disable-transitions="false" @close="handleClose(tag)">{{tag}}</el-tag>
|
|
|
|
+ <el-input class="input-new-tag" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small"
|
|
|
|
+ @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm">
|
|
|
|
+ </el-input>
|
|
|
|
+ <el-button v-else class="button-new-tag" size="small" @click="showInput">添加标签</el-button>
|
|
|
|
+ <!-- <el-input v-model="editForm.headIntroduction" type="textarea" :rows="5" placeholder="请输入机构简介"></el-input> -->
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
@@ -130,8 +140,10 @@
|
|
<el-dialog title="编辑机构信息" v-if="editFormVisibleOther" :visible.sync="editFormVisibleOther" :close-on-click-modal="false" customClass='customWidth'>
|
|
<el-dialog title="编辑机构信息" v-if="editFormVisibleOther" :visible.sync="editFormVisibleOther" :close-on-click-modal="false" customClass='customWidth'>
|
|
<el-form :model="editFormOther" label-width="70px" :rules="formRules" ref="editFormOther">
|
|
<el-form :model="editFormOther" label-width="70px" :rules="formRules" ref="editFormOther">
|
|
<el-form-item label="上课时间" v-if="editType == 1">
|
|
<el-form-item label="上课时间" v-if="editType == 1">
|
|
- <el-time-picker is-range v-model="editFormOther.time" format="HH:mm:ss" value-format="HH:mm:ss"
|
|
|
|
- range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围" style=width:565px;></el-time-picker>
|
|
|
|
|
|
+ <el-time-picker is-range v-model="editFormOther.amTime" format="HH:mm:ss" value-format="HH:mm:ss"
|
|
|
|
+ range-separator="至" start-placeholder="上午开始时间" end-placeholder="上午结束时间" placeholder="选择时间范围" style=width:280px;></el-time-picker>
|
|
|
|
+ <el-time-picker is-range v-model="editFormOther.pmTime" format="HH:mm:ss" value-format="HH:mm:ss"
|
|
|
|
+ range-separator="至" start-placeholder="下午开始时间" end-placeholder="下午结束时间" placeholder="选择时间范围" style=width:280px;></el-time-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="收费标准" v-if="editType == 1">
|
|
<el-form-item label="收费标准" v-if="editType == 1">
|
|
<el-input v-model="editFormOther.chargingStandard" autocomplete="off" placeholder="请输入收费标准"></el-input>
|
|
<el-input v-model="editFormOther.chargingStandard" autocomplete="off" placeholder="请输入收费标准"></el-input>
|
|
@@ -172,7 +184,7 @@
|
|
disabled: false,
|
|
disabled: false,
|
|
|
|
|
|
uploadMsg: {
|
|
uploadMsg: {
|
|
- "id": this.$route.params.id
|
|
|
|
|
|
+ "id": this.$route.params.id==null?JSON.parse(sessionStorage.getItem('user')).ageId:this.$route.params.id,
|
|
},
|
|
},
|
|
|
|
|
|
formRules: {
|
|
formRules: {
|
|
@@ -191,14 +203,18 @@
|
|
editLoading: false,
|
|
editLoading: false,
|
|
editForm: {
|
|
editForm: {
|
|
name: '',
|
|
name: '',
|
|
- headIntroduction: '',
|
|
|
|
|
|
+ headIntroduction: [],
|
|
headPic: [{url:""}],
|
|
headPic: [{url:""}],
|
|
},
|
|
},
|
|
|
|
+ inputVisible: false,
|
|
|
|
+ inputValue: '',
|
|
|
|
|
|
editFormVisibleOther: false,
|
|
editFormVisibleOther: false,
|
|
editOtherLoading: false,
|
|
editOtherLoading: false,
|
|
editFormOther: {
|
|
editFormOther: {
|
|
- time: ['09:00:00','18:00:00'],
|
|
|
|
|
|
+ time: ['09:00:00','18:00:00'],
|
|
|
|
+ amTime: ['09:00:00','12:00:00'],
|
|
|
|
+ pmTime: ['14:00:00','18:00:00'],
|
|
chargingStandard: '',
|
|
chargingStandard: '',
|
|
phone: '',
|
|
phone: '',
|
|
address: '',
|
|
address: '',
|
|
@@ -221,7 +237,11 @@
|
|
id: this.detailId
|
|
id: this.detailId
|
|
}, res => {
|
|
}, res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
- this.detail = res.data;
|
|
|
|
|
|
+ var list = res.data;
|
|
|
|
+ if(list.headIntroduction != null && list.headIntroduction != "") {
|
|
|
|
+ list.tags = list.headIntroduction.split(",")
|
|
|
|
+ }
|
|
|
|
+ this.detail = list;
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
message: res.msg,
|
|
message: res.msg,
|
|
@@ -300,22 +320,32 @@
|
|
this.editOtherLoading = false;
|
|
this.editOtherLoading = false;
|
|
if(type == 0) {
|
|
if(type == 0) {
|
|
this.editFormVisible = true;
|
|
this.editFormVisible = true;
|
|
|
|
+ var array = [];
|
|
|
|
+ if(this.detail.headIntroduction != null && this.detail.headIntroduction != "") {
|
|
|
|
+ array = this.detail.headIntroduction.split(",")
|
|
|
|
+ }
|
|
this.editForm = {
|
|
this.editForm = {
|
|
"name": this.detail.name,
|
|
"name": this.detail.name,
|
|
- "headIntroduction": this.detail.headIntroduction,
|
|
|
|
|
|
+ "headIntroduction": array,
|
|
"headPic": [{url:this.detail.briefIntroductionPic}]
|
|
"headPic": [{url:this.detail.briefIntroductionPic}]
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
this.editFormVisibleOther = true;
|
|
this.editFormVisibleOther = true;
|
|
- const time = this.editFormOther.time;
|
|
|
|
|
|
+ var time = this.editFormOther.time,
|
|
|
|
+ amTime = this.editFormOther.amTime,
|
|
|
|
+ pmTime = this.editFormOther.pmTime;
|
|
if(this.detail.amTime != null) {
|
|
if(this.detail.amTime != null) {
|
|
- time[0] = this.detail.amTime;
|
|
|
|
|
|
+ var am = this.detail.amTime.split('-');
|
|
|
|
+ amTime = am;
|
|
}
|
|
}
|
|
if(this.detail.pmTime != null) {
|
|
if(this.detail.pmTime != null) {
|
|
- time[1] = this.detail.pmTime;
|
|
|
|
|
|
+ var pm = this.detail.pmTime.split('-');
|
|
|
|
+ pmTime = pm;
|
|
}
|
|
}
|
|
this.editFormOther = {
|
|
this.editFormOther = {
|
|
"time": time,
|
|
"time": time,
|
|
|
|
+ "amTime": amTime,
|
|
|
|
+ "pmTime": pmTime,
|
|
"chargingStandard": this.detail.chargingStandard,
|
|
"chargingStandard": this.detail.chargingStandard,
|
|
"phone": this.detail.phone,
|
|
"phone": this.detail.phone,
|
|
"address": this.detail.address,
|
|
"address": this.detail.address,
|
|
@@ -326,6 +356,27 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ //添加标签
|
|
|
|
+ handleClose(tag) {
|
|
|
|
+ this.editForm.headIntroduction.splice(this.editForm.headIntroduction.indexOf(tag), 1);
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ showInput() {
|
|
|
|
+ this.inputVisible = true;
|
|
|
|
+ this.$nextTick(_ => {
|
|
|
|
+ this.$refs.saveTagInput.$refs.input.focus();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ handleInputConfirm() {
|
|
|
|
+ let inputValue = this.inputValue;
|
|
|
|
+ if (inputValue) {
|
|
|
|
+ this.editForm.headIntroduction.push(inputValue);
|
|
|
|
+ }
|
|
|
|
+ this.inputVisible = false;
|
|
|
|
+ this.inputValue = '';
|
|
|
|
+ },
|
|
|
|
|
|
//提交
|
|
//提交
|
|
addSubmit() {
|
|
addSubmit() {
|
|
@@ -334,10 +385,15 @@
|
|
if(this.$refs.upload.uploadFiles.length == 1 && this.$refs.upload.uploadFiles[0].url != this.detail.briefIntroductionPic) {
|
|
if(this.$refs.upload.uploadFiles.length == 1 && this.$refs.upload.uploadFiles[0].url != this.detail.briefIntroductionPic) {
|
|
this.$refs.upload.submit();
|
|
this.$refs.upload.submit();
|
|
} else {
|
|
} else {
|
|
|
|
+ var headIntroduction = "";
|
|
|
|
+ for(var i in this.editForm.headIntroduction) {
|
|
|
|
+ headIntroduction += this.editForm.headIntroduction[i] + ","
|
|
|
|
+ }
|
|
|
|
+ headIntroduction = headIntroduction.substring(0,headIntroduction.length-1);
|
|
this.http.post( this.port.agency.edit, {
|
|
this.http.post( this.port.agency.edit, {
|
|
id: this.detail.id,
|
|
id: this.detail.id,
|
|
name: this.editForm.name,
|
|
name: this.editForm.name,
|
|
- headIntroduction: this.editForm.headIntroduction,
|
|
|
|
|
|
+ headIntroduction: headIntroduction,
|
|
},
|
|
},
|
|
res => {
|
|
res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
@@ -369,10 +425,11 @@
|
|
addSubmitOther() {
|
|
addSubmitOther() {
|
|
var form = {};
|
|
var form = {};
|
|
if(this.editType == 1) {
|
|
if(this.editType == 1) {
|
|
|
|
+ var time = ""
|
|
form = {
|
|
form = {
|
|
id: this.detail.id,
|
|
id: this.detail.id,
|
|
- amTime: this.editFormOther.time[0],
|
|
|
|
- pmTime: this.editFormOther.time[1],
|
|
|
|
|
|
+ amTime: this.editFormOther.amTime[0] + '-' + this.editFormOther.amTime[1],
|
|
|
|
+ pmTime: this.editFormOther.pmTime[0] + '-' + this.editFormOther.pmTime[1],
|
|
chargingStandard: this.editFormOther.chargingStandard,
|
|
chargingStandard: this.editFormOther.chargingStandard,
|
|
phone: this.editFormOther.phone,
|
|
phone: this.editFormOther.phone,
|
|
address: this.editFormOther.address,
|
|
address: this.editFormOther.address,
|
|
@@ -416,10 +473,15 @@
|
|
uploadDiscardFile(params){
|
|
uploadDiscardFile(params){
|
|
var fileObj = params.file;
|
|
var fileObj = params.file;
|
|
var form = new FormData();
|
|
var form = new FormData();
|
|
|
|
+ var headIntroduction = "";
|
|
|
|
+ for(var i in this.editForm.headIntroduction) {
|
|
|
|
+ headIntroduction += this.editForm.headIntroduction[i] + ","
|
|
|
|
+ }
|
|
|
|
+ headIntroduction = headIntroduction.substring(0,headIntroduction.length-1);
|
|
form.append("file", fileObj);
|
|
form.append("file", fileObj);
|
|
form.append("id", this.detail.id);
|
|
form.append("id", this.detail.id);
|
|
form.append("name", this.editForm.name);
|
|
form.append("name", this.editForm.name);
|
|
- form.append("headIntroduction", this.editForm.headIntroduction);
|
|
|
|
|
|
+ form.append("headIntroduction", headIntroduction);
|
|
this.http.uploadFile( this.port.agency.edit, form,
|
|
this.http.uploadFile( this.port.agency.edit, form,
|
|
res => {
|
|
res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
@@ -582,6 +644,24 @@
|
|
line-height: 30px;
|
|
line-height: 30px;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ .el-tag + .el-tag {
|
|
|
|
+ margin-left: 10px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .button-new-tag {
|
|
|
|
+ margin-left: 10px;
|
|
|
|
+ height: 32px;
|
|
|
|
+ line-height: 30px;
|
|
|
|
+ padding-top: 0;
|
|
|
|
+ padding-bottom: 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .input-new-tag {
|
|
|
|
+ width: 90px;
|
|
|
|
+ margin-left: 10px;
|
|
|
|
+ vertical-align: bottom;
|
|
|
|
+ }
|
|
|
|
+
|
|
.el-container.is-vertical {
|
|
.el-container.is-vertical {
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
}
|
|
}
|
|
@@ -682,6 +762,6 @@
|
|
}
|
|
}
|
|
|
|
|
|
.formMap {
|
|
.formMap {
|
|
- height: 400px;
|
|
|
|
|
|
+ height: 300px;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|