123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
-
- @{
- ViewBag.Title = "MobileSmart";
- Layout = "~/Views/MobileProblem/_APPMain.cshtml";
- }
- <link href="~/Content/Scripts/plugins/mui/css/mui.imageviewer.css" rel="stylesheet" />
- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
- <link href="~/Content/Scripts/plugins/form-making-advanced@1.4.4.00/dist/FormMaking.css" rel="stylesheet" />
- <script src="~/Content/Scripts/plugins/mui/js/mui.zoom.js"></script>
- <script src="~/Content/Scripts/plugins/mui/js/mui.previewimage.js"></script>
- <!-- 引入组件库 -->
- <script src="https://unpkg.com/element-ui/lib/index.js"></script>
- <script src="~/Content/Scripts/plugins/form-making-advanced@1.4.4.00/dist/FormMaking.umd.js"></script>
- <style>
- .message-title {
- font-size: 16px;
- font-weight: 500;
- padding: 1rem 1rem;
- }
- .message-detail {
- font-size: 14px;
- padding: 1rem 1rem;
- display: inline-block
- }
- .message-person {
- font-size: 12px;
- padding: 0 1rem;
- color: #adadb5;
- }
- .mui-content {
- background-color: white
- }
- div {
- word-wrap: break-word;
- word-break: break-all;
- }
- p {
- word-wrap: break-word;
- word-break: break-all;
- }
- </style>
- <header class="mui-bar mui-bar-nav">
- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color:#ffffff"></a>
- <h1 class="mui-title" style="color:white">表单填写</h1>
- </header>
- <div class="mui-content mui-scroll-wrapper" style="margin-bottom: 50px; " id="fill">
- <div class="mui-scroll">
- <div title="填报内容表单" style=" padding-top: 5px; height: 100%;">
- <fm-generate-form v-if="isshow" :data="jsonData" :value="editData" preview generate-code generate-json ref="fillitem"></fm-generate-form>
- </div>
- </div>
- <nav class="mui-bar mui-bar-tab">
- <button v-on:click="Submit()" type="button" class="mui-btn mui-btn-primary" style="width:48%;background-color: #2ab8ff;border:none;margin-right:10px">我的填写</button>
- <button v-on:click="Save()" type="button" class="mui-btn mui-btn-danger" style="width:48%;border:none;background-color: #fb7e00">保存</button>
- </nav>
- </div>
- <script>
- var vm = new Vue({
- el: '#fill',
- data: {
- /// 表单数据
- jsonData: {},
- editData: {},
- isshow: false,
- BDBBID: "",//表单版本id
- BDM: "",
- BDJG: "",
- BDCLJG: '',
- QDID: '',//渠道id
- QDMC: '',//渠道名称
- XMID: "",//项目id
- XMMC:"",//项目名称
- },
- computed: {},
- methods: {
- init: function init() {
- var that = this;
- $.post('/SmartForm/BdxxSelect', { id: '@ViewBag.ID' }, function (data) {
- that.isshow = false
- that.jsonData = JSON.parse(data.BDNR);
- that.BDM = data.MC;
- that.$nextTick(() => {
- that.isshow = true
- })
- })
- },
- //保存
- Save: function Save() {
- var that = this;
- that.$refs.fillitem.getData().then(data => {
- var param = {
- BDBBID: this.BDBBID,
- BDM: this.BDM,
- BDJG: JSON.stringify(data),
- BDCLJG: '',
- QDID: '',
- QDMC: '',
- XMID: '',
- XMMC: '项目名称',
- };
- $.post("/SmartForm/AddRecord", param, function (data) {
- if (data.code == 200) {
- mui.toast(data.msg, { duration: 'long', type: 'div' });
- } else {
- mui.toast(data.msg, { duration: 'long', type: 'div' });
- }
- })
- }).catch(e => {
- })
- }
- },
- watch: {
- },
- mounted: function mounted() {
- this.init();
- mui.init({
- swipeBack: true //启用右滑关闭功能
- });
- mui.previewImage();
- mui('.mui-scroll-wrapper').scroll();
-
- }
- });
- </script>
|