Commit 74013aab authored by 黄奎's avatar 黄奎

新增自定义表单

parent 89ba1aab
...@@ -190,9 +190,7 @@ ...@@ -190,9 +190,7 @@
<li class="menu_item" :class="{'Fchecked':isChecked=='/startupPage'}" @click="isChecked='/startupPage',CommonJump('startupPage')"> <li class="menu_item" :class="{'Fchecked':isChecked=='/startupPage'}" @click="isChecked='/startupPage',CommonJump('startupPage')">
<i class="el-icon-menu"></i><span>启动页</span> <i class="el-icon-menu"></i><span>启动页</span>
</li> </li>
<li style="display:none;" class="menu_item" :class="{'Fchecked':isChecked==5}" @click="isChecked=5">
<i class="el-icon-menu"></i><span>表单提交信息</span>
</li>
</ul> </ul>
</div> </div>
</div> </div>
......
<template>
<div class="brandClassification">
<div class="head-title">
自定义表单
<el-button style="float:right;margin-top: -5px;" size="small" type="primary" @click="goRegistrationAdd(null)">
新增</el-button>
</div>
<div class="content">
<div>
<div class="searchInput" style="width:250px">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" @clear="msg.pageIndex=1,getList()"
style="display:inline-block;width:225px;height:30px" placeholder="表单名称" v-model="msg.FormName" size="small"
clearable>
</el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search"
style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
</div>
<el-table :data="tableData" v-loading="loading" border style="width: 100%;margin:20px 0">
<el-table-column prop="Id" label="编号" width="100">
</el-table-column>
<el-table-column prop="FormName" label="表单名称">
</el-table-column>
<el-table-column prop="CreateDate" width="200" label="创建时间">
</el-table-column>
<el-table-column prop="address" width="200" label="操作">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="编辑" placement="top">
<img style="width:32px;height:32px" src="../../assets/img/userman/edit.png"
@click="goRegistrationAdd(scope.row)" alt="">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start">
>
<img style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/del.png"
@click="delCustomForm(scope.row)" alt="">
</el-tooltip>
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:right" background @current-change="handleCurrentChange" :page-size="msg.pageSize"
:current-page.sync="msg.pageIndex" layout="total,prev, pager, next" :total="total">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
components: {},
data() {
return {
msg: {
pageIndex: 1,
pageSize: 10,
FormName: '',
},
total: 0,
tableData: [], //数据列表
loading: false
};
},
created() {
this.getList();
},
methods: {
getList() {
this.loading = true;
this.apipost("/api/CustomForm/GetCustomFormPage", this.msg, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
let pageData = res.data.data.pageData;
this.tableData = pageData;
}
})
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
//删除自定义表单
delCustomForm(item) {
let that = this;
that.Confirm("是否删除?", function () {
that.apipost(
"/api/CustomForm/RemoveCustomeForm", {
Id: item.Id,
},
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList();
} else {
that.Error(res.data.message);
}
},
);
});
},
//新增组件
goRegistrationAdd(item) {
var obj = {
blank: "y",
};
if (item) {
obj = {
blank: "y",
Id: item.Id,
};
}
this.$router.push({
name: "customerFormsAdd",
query: obj,
});
}
},
mounted() {}
};
</script>
<style>
.brandClassification .content {
background: #fff;
margin-top: 10px;
padding: 20px;
box-sizing: border-box;
}
</style>
This diff is collapsed.
...@@ -283,10 +283,10 @@ ...@@ -283,10 +283,10 @@
<el-form-item label="表单名称"> <el-form-item label="表单名称">
<el-input type="text" size="small" v-model="addMsg.FormName" maxlength="50"></el-input> <el-input type="text" size="small" v-model="addMsg.FormName" maxlength="50"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="对应类型" style="width:300px;" class="registraType"> <!-- <el-form-item label="对应类型" style="width:300px;" class="registraType">
<el-radio v-model="addMsg.FormType" v-for="(item,index) in CustomTypeList" :label="item.Id" :key="index"> <el-radio v-model="addMsg.FormType" v-for="(item,index) in CustomTypeList" :label="item.Id" :key="index">
{{item.Name}}</el-radio> {{item.Name}}</el-radio>
</el-form-item> </el-form-item> -->
</el-form> </el-form>
<div class="component-group" v-for="(item, index) in allComponents" :key="index"> <div class="component-group" v-for="(item, index) in allComponents" :key="index">
<div class="component-group-name">{{ item.GroupName }}</div> <div class="component-group-name">{{ item.GroupName }}</div>
......
...@@ -132,7 +132,6 @@ export default new Router({ ...@@ -132,7 +132,6 @@ export default new Router({
name: 'ALiPayAppMsg', name: 'ALiPayAppMsg',
component: resolve => require(['@/components/StoreDesign/ALiPayAppMsg'], resolve), component: resolve => require(['@/components/StoreDesign/ALiPayAppMsg'], resolve),
}, },
] ]
}, },
{ {
...@@ -146,7 +145,6 @@ export default new Router({ ...@@ -146,7 +145,6 @@ export default new Router({
name: 'adminList', name: 'adminList',
component: resolve => require(['@/components/phoneManage/adminList'], resolve), component: resolve => require(['@/components/phoneManage/adminList'], resolve),
}, },
] ]
}, },
{ {
...@@ -1706,7 +1704,16 @@ export default new Router({ ...@@ -1706,7 +1704,16 @@ export default new Router({
name: 'addAutoreleaseCoupon', name: 'addAutoreleaseCoupon',
component: resolve => require(['@/components/sallCenter/addAutoreleaseCoupon'], resolve), component: resolve => require(['@/components/sallCenter/addAutoreleaseCoupon'], resolve),
}, },
{ //自定义表单
path: '/customerForms',
name: 'customerForms',
component: resolve => require(['@/components/sallCenter/customerForms'], resolve),
},
{ //新增修改自定义表单
path: '/customerFormsAdd',
name: 'customerFormsAdd',
component: resolve => require(['@/components/sallCenter/customerFormsAdd'], resolve),
}
] ]
}, },
{ {
...@@ -1792,4 +1799,4 @@ export default new Router({ ...@@ -1792,4 +1799,4 @@ export default new Router({
component: resolve => require(['@/components/coffeeManage/orderDetails'], resolve), component: resolve => require(['@/components/coffeeManage/orderDetails'], resolve),
}, },
] ]
}) })
\ No newline at end of file
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