123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
-
- @{
- ViewBag.Title = "MobileSmartDetail";
- Layout = null;
- }
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>中联区卫问题登记</title>
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit" />
- <link href="~/Content/Scripts/plugins/mui/css/mui.css" rel="stylesheet" />
- <link href="~/Content/Scripts/plugins/element/element-ui.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/jquery.min.js"></script>
- <script src="~/Content/Scripts/CookieManage.js?v=1.0"></script>
- <script src="~/Content/Scripts/vue.js"></script>
- <script src="~/Content/Scripts/plugins/element/elementui.js"></script>
- <script src="~/Content/Scripts/plugins/form-making-advanced@1.4.4.00/dist/FormMaking.umd.js"></script>
- </head>
- <body>
- <style>
- body {
- font-family: -apple-system, BlinkMacSystemFont, "PingFang SC","HelveticaNeue",STHeiti,"Microsoft Yahei",Tahoma,Simsun,sans-serif;
- background-color: white
- }
- .mui-bar {
- box-shadow: 0 0 7px rgb(183,210,422);
- }
- .mui-bar-nav {
- background-color: #00aaff;
- }
- .mui-toast-container {
- bottom: 50% !important;
- }
- [v-cloak] {
- display: none;
- }
- .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>
- <div id="fill">
- <header class="mui-bar mui-bar-nav">
- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" v-on:click="Beforeback()" style="color:#ffffff"></a>
- <h1 class="mui-title" style="color:white">{{BDM}}</h1>
- </header>
- <div class="mui-content" style="margin:10px 10px 60px 10px;" v-loading="loading">
- <div title="填报内容表单" style="padding: 5px 10px; height: 100%; ">
- <fm-generate-form v-if="isshow" :data="jsonData" ref="fillitem"></fm-generate-form>
- </div>
- </div>
- <nav class="mui-bar mui-bar-tab">
- <button v-on:click="MySmart()" type="button" class="mui-btn mui-btn-primary" style="width:30%;background-color: #2ab8ff;border:none;margin-right:10px">返回首页</button>
- <button v-on:click="Save(0)" type="button" class="mui-btn mui-btn-danger" style="width: 30%; border: none; background-color: #6dd724;margin-right:10px ">提交</button>
- <button v-on:click="Save(3)" type="button" class="mui-btn mui-btn-danger" style="width: 30%; border: none; background-color: #fb7e00">暂存</button>
- </nav>
- </div>
- </body>
- </html>
- <script>
- var vm = new Vue({
- el: '#fill',
- data: {
- loading: true,
- /// 表单数据
- jsonData: {},
- isshow: false,
- BDMBID: "",//表单模板id
- BDXXID:"",//表单信息id
- BDNR: "",//表单内容
- BDM: "",
- 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.BDNR = data.BDNR;
- that.BDMBID = data.BDMBID;
- that.BDXXID = data.ID;
- that.BDM = data.MC;
- that.BDCLNR = data.BDCLNR;
- that.$nextTick(() => {
- that.isshow = true
- that.loading = false
- })
- })
- },
- //保存
- Save: function Save(type) {
- var that = this;
- that.loading = true;
- var ProjectJson = JSON.parse(getCookie("UserMobileSmart"));
- that.$refs.fillitem.getData().then(data => {
- var param = {
- BDMBID: that.BDMBID,
- BDXXID: that.BDXXID,
- BDM: that.BDM,
- BDJG: escape(JSON.stringify(data)),
- BDNR: escape(that.BDNR),
- BDCLNR: escape(that.BDCLNR),
- QDID: '',
- QDMC: '',
- XMID: ProjectJson.ProjectSelect,
- XMMC: ProjectJson.ProjectSelectName,
- TBZT: type,
- };
- $.post("/SmartForm/AddRecord", param, function (data) {
- if (data.code == 200) {
- that.$message({
- message: data.msg,
- type: 'success'
- });
- setTimeout(() => {
- that.loading = false;
- that.MySmart()
- } , 1000);
- } else {
- that.loading = false;
- that.$message.error(data.msg);
- }
- })
- }).catch(e => {
- console.log(e);
- that.loading = false;
- that.$message.error("请注意必填项目!");
- })
- },
- ///返回首页
- MySmart: function MySmart(){
- window.location.href = '/MobileProblem/Home';
- } , ///返回上一页
- Beforeback: function Beforeback() {
- window.location.href = '/SmartForm/MobileSmart';
- }
- },
- watch: {
- },
- mounted: function mounted() {
- this.init();
- }
- });
- </script>
|