Commit 1ffd1c17 authored by 黄奎's avatar 黄奎
parents da206835 68ab550f
<template>
<div>
<el-table :data="dataList" style="width: 100%">
<el-table-column prop="Id" label="ID" width="100">
</el-table-column>
<el-table-column prop="TemplateName" label="模板名称">
</el-table-column>
<el-table-column prop="address" label="操作" width="100">
<template slot-scope="scope">
<el-button @click="getModel(scope.row)" size="mini">选择</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination background @current-change="handleCurrentChange"
:page-size="qMsg.pageSize" layout="prev, pager, next" :total="total">
</el-pagination>
</div>
</template>
<script>
export default {
data() {
return {
dataList: [],
total: 0,
qMsg: {
pageIndex: 1,
pageSize: 20,
}
}
},
methods: {
handleCurrentChange(val) {
this.qMsg.pageIndex = val;
this.getList();
},
//获取数据
getList() {
this.apipost("/api/Template/GetMiniTemplatePageList", this.qMsg, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
} else {
this.Info(res.data.message);
}
})
},
//选择
getModel(item){
let str='';
str='#'+item.Id+':'+item.TemplateName;
this.$emit('getCustom',str)
},
},
mounted() {
this.getList();
}
}
</script>
......@@ -38,7 +38,7 @@
defaultMsg(newVal, oldVal) {
if (!this.isInputChange && newVal) {
if (this.editor && this.editor.isReady === 1) {
this.editor.setContent(newVal);
// this.editor.setContent(newVal);
} else {
this.tempContent = newVal;
}
......
......@@ -83,7 +83,7 @@
</el-form-item>
<el-form-item label="对应模板">
<el-input type="text" size="small" v-model="item.TemplateId">
<el-button slot="append">选择模板</el-button>
<el-button slot="append" @click="isShowModule=true,commonIndex=index">选择模板</el-button>
</el-input>
</el-form-item>
</el-form>
......@@ -107,14 +107,26 @@
<el-button size="small" style="margin-top:20px;padding:9px 25px;" type="primary" @click="submitform('addMsg')">保存
</el-button>
</template>
<!-- 选择模板 -->
<el-dialog title="选择模板" :visible.sync="isShowModule" width="910px">
<choiceModule ref="choiceModule" @getCustom="getCustom"></choiceModule>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="isShowModule = false">取 消</el-button>
<el-button size="small" type="primary" @click="choiceModule()">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import choiceModule from "../common/choiceModule.vue";
export default {
data() {
return {
commonIndex:-1,
loading: false,
CustomIsShowAdd: true,
//模板弹窗
isShowModule:false,
dataList: [],
msg: {
pageIndex: 1,
......@@ -132,12 +144,19 @@
};
},
components: {
choiceModule
},
created() {
},
methods: {
//选择模板
getCustom(e){
if (this.commonIndex > -1) {
this.addMsg.DetailsList[this.commonIndex].TemplateId = e;
}
this.isShowModule = false;
},
//更新是否禁用
updateIsUse(item) {
this.apipost("/api/Template/SetMiniprogramPageTemplIsUse", {
......
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