Commit 79b5fdfe authored by zhengke's avatar zhengke

修改

parent 370f05b0
...@@ -97,7 +97,8 @@ ...@@ -97,7 +97,8 @@
if (this.emitmsg && this.emitmsg.length > 0) { if (this.emitmsg && this.emitmsg.length > 0) {
var result = { var result = {
selectId: this.emitmsg[0].selectId, selectId: this.emitmsg[0].selectId,
url: this.emitmsg[0].url url: this.emitmsg[0].url,
Name:this.emitmsg[0].MediaName
}; };
this.$emit('SelectId', result) this.$emit('SelectId', result)
} }
...@@ -131,7 +132,8 @@ ...@@ -131,7 +132,8 @@
console.log(item,'item'); console.log(item,'item');
this.emitmsg.push({ this.emitmsg.push({
selectId: item.Id, selectId: item.Id,
url: item.Path url: item.Path,
Name:item.MediaName
}); });
this.selectId = item.Id; this.selectId = item.Id;
}, },
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
本地上传 本地上传
</el-upload> </el-upload>
</q-item> </q-item>
<q-item clickable v-close-popup @click="onItemClick"> <q-item clickable v-close-popup @click="getImgChoice=true">
从图片库选择 从图片库选择
</q-item> </q-item>
</q-list> </q-list>
...@@ -104,21 +104,24 @@ ...@@ -104,21 +104,24 @@
<div style="margin-top: 20px;"> <div style="margin-top: 20px;">
<contributionUE :config="config" ref="UE_cb"></contributionUE> <contributionUE :config="config" ref="UE_cb"></contributionUE>
</div> </div>
</div> </div>
<!-- 选择文件 -->
<q-dialog title="选择文件" v-model="getImgChoice" width="1200px">
<ChooseImg @SelectId="SelectId" @closeDia="getImgChoice=false"></ChooseImg>
</q-dialog>
</div> </div>
</template> </template>
<script> <script>
import contributionUE from './ue/contributionUE' import contributionUE from './ue/contributionUE'
import ChooseImg from '../components/ChooseImg'
export default { export default {
meta: { meta: {
title: "新增/修改图文" title: "新增/修改图文"
}, },
components: { components: {
contributionUE, contributionUE,
ChooseImg
}, },
data() { data() {
...@@ -130,9 +133,10 @@ ...@@ -130,9 +133,10 @@
config: { config: {
initialFrameWidth: null, initialFrameWidth: null,
initialFrameHeight: 300, initialFrameHeight: 300,
zIndex:99
}, },
importFileUrl2: this.domainManager().UploadFileUrl2, importFileUrl2: this.domainManager().UploadFileUrl2,
getImgChoice:false
} }
}, },
...@@ -140,6 +144,18 @@ ...@@ -140,6 +144,18 @@
}, },
methods: { methods: {
//选择图片
SelectId(obj){
console.log(obj,'数据');
if(obj){
let data = [{
fileName:obj.Name,
fileUrl: obj.url
}]
this.$refs.UE_cb.instertImage(data)
this.getImgChoice=false;
}
},
successUpload(file) { successUpload(file) {
console.log(file,'file'); console.log(file,'file');
if (file.Code == 1) { if (file.Code == 1) {
......
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