Commit 6a2013c5 by Lyan

bug修改

parent 1c264e08
......@@ -4,18 +4,18 @@
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="130px">
<el-form-item label="原始标题" prop="titleOld">
<el-form-item label="原始标题" prop="titleOld">
<el-input v-model="dataForm.titleOld" placeholder="请输入原始标题" v-show="!showInfo"></el-input>
</el-form-item>
<el-form-item label="显示标题" prop="title">
<el-form-item label="显示标题" prop="title">
<el-input v-model="dataForm.title" placeholder="请输入显示标题" v-show="!showInfo"></el-input>
<p v-show="showInfo">{{dataForm.title}}</p>
</el-form-item>
<el-form-item label="跳转至" prop="directpath">
<el-form-item label="跳转至" prop="directpath">
<el-input v-model="dataForm.directpath" placeholder="请输入跳转地址" v-show="!showInfo"></el-input>
<p v-show="showInfo">{{dataForm.directpath}}</p>
</el-form-item>
<el-form-item label='级别' prop='levels'>
<el-form-item label='级别' prop='levels'>
<el-select v-model="dataForm.levels" placeholder="请输入级别" v-show="!showInfo">
<el-option
v-for="item in piclevelList"
......@@ -26,19 +26,19 @@
</el-select>
<p v-show="showInfo">{{dataForm.levels}}</p>
</el-form-item>
<el-form-item label="关键字" prop="keyword">
<el-form-item label="关键字" prop="keyword">
<el-input v-model="dataForm.keyword" placeholder="请输入关键字" v-show="!showInfo"></el-input>
<p v-show="showInfo">{{dataForm.keyword}}</p>
</el-form-item>
<el-form-item label="演讲人" prop="author">
<el-form-item label="演讲人" prop="author">
<el-input v-model="dataForm.author" placeholder="请输入演讲人" v-show="!showInfo"></el-input>
<p v-show="showInfo">{{dataForm.author}}</p>
</el-form-item>
<el-form-item label="长度" prop="longStr">
<el-form-item label="长度" prop="longStr">
<el-input v-model="dataForm.longStr" placeholder="请输入长度" v-show="!showInfo"></el-input>
<p v-show="showInfo">{{dataForm.longStr}}</p>
</el-form-item>
<el-form-item label="时间" prop="stdate">
<el-form-item label="时间" prop="stdate">
<!-- <el-date-picker
v-show="!showInfo"
......@@ -50,7 +50,7 @@
<el-input v-model="dataForm.stdate" placeholder="请输入时间" v-show="!showInfo"></el-input>
<p v-show="showInfo">{{dataForm.stdate}}</p>
</el-form-item>
<el-form-item label='语种' prop='clanguage'>
<el-form-item label='语种' prop='clanguage'>
<el-select v-model="dataForm.clanguage" placeholder="请输入级别" v-show="!showInfo">
<el-option
v-for="item in clanguageList"
......@@ -63,7 +63,7 @@
<el-form-item label="上传图片命名规则" prop="rules">
<span style="color:red;font-size:12px">图片命名格式为DB+时间+拼音,如:DB20180701tupian1;图片尺寸500*375</span>
</el-form-item>
<el-form-item label="描述图片" prop="pic" >
<el-form-item label="描述图片" prop="pic" >
<el-upload
class="avatar-uploader avatar2"
action=""
......@@ -74,8 +74,9 @@
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p v-show="showInfo"><img :src="imgUrlStr" class="avatar2"></p>
<p class="mark">注:推荐新闻(列表中第一条新闻)需上传此图,级别选择"2",尺寸为"260*200"</p>
</el-form-item>
<el-form-item label="MP4文件" prop="video" class="pic">
<el-form-item label="MP4文件" prop="video" class="pic">
<el-upload
class="avatar-uploader avatar2"
action=""
......@@ -86,13 +87,25 @@
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p v-show="showInfo"><video :src="videoUrlStr" class="avatar2"></video></p>
<p class="mark">注:视频为MP4格式,视频编码推荐h.264,音频格式AAC,不超过100M</p>
</el-form-item>
<el-form-item label="" prop="content" >
<el-form-item label="说明" prop="content" >
<Ueditor @ready="editorReady" :value="ueditor.value" :config="ueditor.config" ref="ue" v-show="!showInfo"></Ueditor>
<!-- <el-input v-model="dataForm.content" placeholder="请输入内容"></el-input> -->
<div v-show="showInfo" v-html="dataForm.content"></div>
</el-form-item>
<el-form-item label="时间" prop="showtime">
<el-date-picker
v-show="!showInfo"
v-model="dataForm.showtime"
value-format='yyyy-MM-dd'
type="date"
placeholder="选择日期">
</el-date-picker>
<p class="mark"><span style="color:#606266">(时间格式为:xxxx/xx/xx)</span>注:不填写为默认上传日期</p>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer" v-show="!showInfo">
<el-button @click="visible = false">取消</el-button>
......@@ -130,7 +143,8 @@ export default {
longStr: '',
stdate: '',
clanguage: '',
wavname: ''
wavname: '',
showtime: ''
},
cclassidStr: undefined,
dataRule: {
......@@ -149,9 +163,9 @@ export default {
// author: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
stdate: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// stdate: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
levels: [
{ required: true, message: '不能为空', trigger: 'blur' }
]
......@@ -251,7 +265,8 @@ export default {
'clanguage': this.dataForm.clanguage,
'pic': this.dataForm.pic,
'wavname': this.dataForm.wavname,
'content': this.dataForm.content
'content': this.dataForm.content,
'showtime': this.dataForm.showtime
})
}).then(({data}) => {
this.loading = false
......@@ -370,5 +385,8 @@ export default {
}
</script>
<style scoped>
.mark{
color: red;
font-size: 10px;
}
</style>
\ No newline at end of file
......@@ -54,7 +54,7 @@
return {
visible: false,
dataForm: {
branchCode: 0,
id: 0,
branchName: '',
branchAddress: '',
branchPostcode: '',
......@@ -77,13 +77,13 @@
},
methods: {
init (id) {
this.dataForm.branchCode = id || 0
this.dataForm.id = id || 0
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.branchCode) {
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`/office/branch/info/${this.dataForm.branchCode}`),
url: this.$http.adornUrl(`/office/branch/info/${this.dataForm.id}`),
method: 'get',
params: this.$http.adornParams()
}).then(({data}) => {
......
......@@ -6,7 +6,7 @@
</el-form-item>
<el-form-item>
<el-button @click="getDataList()" type="primary">查询</el-button>
<el-button v-if="isAuth('manage:branch:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
<!-- <el-button v-if="isAuth('manage:branch:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button> -->
<!-- <el-button v-if="isAuth('manage:branch:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button> -->
</el-form-item>
</el-form>
......
<template>
<el-dialog
:title="!dataForm.id ? '新增' : this.showInfo ? '详情' : '修改'"
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible"
>
......@@ -16,15 +16,15 @@
<el-input
v-model="dataForm.title"
placeholder="请输入标题"
v-show="!showInfo"
:disabled='!showInfo'
></el-input>
<p v-show="showInfo">{{ dataForm.title }}</p>
</el-form-item>
<el-form-item label="服务行业:" prop="service">
<el-select
v-model="dataForm.service"
placeholder="请选择服务行业"
v-show="!showInfo"
:disabled='!showInfo'
>
<el-option
v-for="item in serviceList"
......@@ -41,7 +41,6 @@
<el-select
v-model="dataForm.levels"
placeholder="请选择级别"
v-show="!showInfo"
>
<el-option
v-for="item in piclevelList"
......@@ -51,18 +50,18 @@
>
</el-option>
</el-select>
<p v-show="showInfo">{{ dataForm.levels }}</p>
</el-form-item>
<el-form-item label="显示时间:" prop="showtime">
<el-date-picker
v-show="!showInfo"
:disabled='!showInfo'
v-model="dataForm.showtime"
value-format="yyyy-MM-dd"
type="date"
placeholder="选择日期"
>
</el-date-picker>
<p v-show="showInfo">{{ dataForm.showtime }}</p>
</el-form-item>
<!-- <el-form-item label="图片:" prop="pic">
<el-upload
......@@ -84,10 +83,10 @@
:value="ueditor.value"
:config="ueditor.config"
ref="ue"
v-show="!showInfo"
:disabled='!showInfo'
></Ueditor>
<!-- <el-input v-model="dataForm.content" placeholder="请输入内容"></el-input> -->
<div v-show="showInfo" v-html="dataForm.brief"></div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer" v-show="!showInfo">
......@@ -308,6 +307,11 @@ export default {
// 更新父子组件内容
editorReady (instance) {
instance.setContent(this.dataForm.brief)
if (!this.showInfo) {
instance.setDisabled()
} else {
instance.setEnabled()
}
instance.addListener('contentChange', () => {
this.dataForm.brief = instance.getContent()
})
......
<template>
<el-dialog
:title="!dataForm.id ? '新增' : this.showInfo ? '详情' : '修改'"
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible"
>
......@@ -16,15 +16,16 @@
<el-input
v-model="dataForm.firmname"
placeholder="请输入企业名称"
v-show="!showInfo"
:disabled='!showInfo'
></el-input>
<p v-show="showInfo">{{ dataForm.firmname }}</p>
</el-form-item>
<el-form-item label="技术领域:" prop="technology">
<el-select
v-model="dataForm.technology"
placeholder="请选择技术领域"
v-show="!showInfo"
:disabled='!showInfo'
>
<el-option
v-for="item in technologyList"
......@@ -34,13 +35,13 @@
>
</el-option>
</el-select>
<p v-show="showInfo">{{ dataForm.technology }}</p>
</el-form-item>
<el-form-item label="服务行业:" prop="service">
<el-select
v-model="dataForm.service"
placeholder="请选择服务行业"
v-show="!showInfo"
:disabled='!showInfo'
>
<el-option
v-for="item in serviceList"
......@@ -50,45 +51,44 @@
>
</el-option>
</el-select>
<p v-show="showInfo">{{ dataForm.service }}</p>
</el-form-item>
<el-form-item label="网址:" prop="site">
<el-input
v-model="dataForm.site"
placeholder="请输入网址"
v-show="!showInfo"
:disabled='!showInfo'
></el-input>
<p v-show="showInfo">{{ dataForm.site }}</p>
</el-form-item>
<el-form-item label="联系人姓名:" prop="name">
<el-input
v-model="dataForm.name"
placeholder="请输入联系人姓名"
v-show="!showInfo"
:disabled='!showInfo'
></el-input>
<p v-show="showInfo">{{ dataForm.name }}</p>
</el-form-item>
<el-form-item label="联系电话:" prop="phone">
<el-input
v-model="dataForm.phone"
placeholder="请输入联系电话"
v-show="!showInfo"
:disabled='!showInfo'
></el-input>
<p v-show="showInfo">{{ dataForm.phone }}</p>
</el-form-item>
<el-form-item label="邮箱:" prop="email">
<el-input
v-model="dataForm.email"
placeholder="请输入邮箱"
v-show="!showInfo"
:disabled='!showInfo'
></el-input>
<p v-show="showInfo">{{ dataForm.email }}</p>
</el-form-item>
<el-form-item label="级别:" prop="levels">
<el-select
v-model="dataForm.levels"
placeholder="请选择级别"
v-show="!showInfo"
>
<el-option
v-for="item in piclevelList"
......@@ -98,17 +98,17 @@
>
</el-option>
</el-select>
<p v-show="showInfo">{{ dataForm.levels }}</p>
</el-form-item>
<el-form-item label="上传图片:" prop="pic">
<el-upload
v-show="!showInfo"
class="avatar-uploader avatar2"
action=""
:show-file-list="false"
:http-request="Upload"
:before-upload="beforeAvatarUpload"
:disabled='!showInfo'
>
<img v-if="dialogVisible" :src="imgUrlStr" class="" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
......@@ -122,13 +122,11 @@
:value="ueditor.value"
:config="ueditor.config"
ref="ue"
v-show="!showInfo"
></Ueditor>
<!-- <el-input v-model="dataForm.content" placeholder="请输入内容"></el-input> -->
<div v-show="showInfo" v-html="dataForm.brief"></div>
<!-- <div v-show="!showInfo" v-html="dataForm.brief"></div> -->
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer" v-show="!showInfo">
<span slot="footer" class="dialog-footer" >
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</span>
......@@ -255,6 +253,8 @@ export default {
piclevelList
}
},
created () {
},
methods: {
getSelectName (list, id) {
let arr = list.filter((item) => {
......@@ -383,9 +383,22 @@ export default {
this.dialogVisible = false
this.ueditor.value = ''
},
clearInp2 () {
this.$router.go(0)
this.imgUrlStr = ''
this.dialogVisible = false
this.visible = false
this.ueditor.value = ''
},
// 更新父子组件内容
editorReady (instance) {
instance.setContent(this.dataForm.brief)
if (!this.showInfo) {
instance.setDisabled()
} else {
instance.setEnabled()
}
instance.addListener('contentChange', () => {
this.dataForm.brief = instance.getContent()
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment