 -- ----------------------------
 -- Records of role
 -- ----------------------------
-INSERT INTO `role` VALUES (1, '超级管理员', 0, NULL);
 INSERT INTO `role` VALUES (48, 'msopen', 57, 1);
 
 -- ----------------------------

 Target Server Version : 50725
 File Encoding         : 65001

 Date: 30/12/2019 22:50:25
*/

SET NAMES utf8mb4;

  `model_field` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `model_custom_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 42 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '自定义模型' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of mdiy_model
-- ----------------------------
INSERT INTO `mdiy_model` VALUES (41, '{\"html\":\"<template id=\\\"custom-model\\\">\\r\\n    <el-form ref=\\\"form\\\" :model=\\\"form\\\" :rules=\\\"rules\\\" label-width=\\\"120px\\\" label-position=\\\"right\\\" size=\\\"small\\\">\\r\\n            <el-form-item  label=\\\"姓名\\\" prop=\\\"name\\\"\\r\\n>\\r\\n                <el-input v-model=\\\"form.name\\\"\\r\\n                          :disabled=\\\"false\\\"\\r\\n                          :style=\\\"{width:  \'100%\'}\\\"\\r\\n                          :clearable=\\\"true\\\"\\r\\n                          placeholder=\\\"请输入姓名\\\">\\r\\n                </el-input>\\r\\n            </el-form-item>\\r\\n            <el-form-item  label=\\\"手机\\\" prop=\\\"phone\\\"\\r\\n>\\r\\n                <el-input v-model=\\\"form.phone\\\"\\r\\n                          :disabled=\\\"false\\\"\\r\\n                          :style=\\\"{width:  \'100%\'}\\\"\\r\\n                          :clearable=\\\"true\\\"\\r\\n                          placeholder=\\\"请输入手机\\\">\\r\\n                </el-input>\\r\\n            </el-form-item>\\r\\n            <el-form-item  label=\\\"留言\\\" prop=\\\"words\\\"\\r\\n>\\r\\n                <el-input\\r\\n                        type=\\\"textarea\\\" :rows=\\\"5\\\"\\r\\n                        :disabled=\\\"false\\\"\\r\\n\\r\\n                        v-model=\\\"form.words\\\"\\r\\n                        :style=\\\"{width: \'100%\'}\\\"\\r\\n                        placeholder=\\\"请输入留言\\\">\\r\\n                </el-input>\\r\\n            </el-form-item>\\r\\n    </el-form>\\r\\n</template>\\r\\n\",\"script\":\"       var custom_model = Vue.component(\\\"custom-model\\\",{\\r\\n            el: \'#custom-model\',\\r\\n            data() {\\r\\n                return {\\r\\n                    modelId:0,\\r\\n                    //表单数据\\r\\n                    form: {\\r\\n                        linkId:0,\\r\\n                    // 姓名\\r\\n                    name:\'\',\\r\\n                    // 手机\\r\\n                    phone:\'\',\\r\\n                    // 留言\\r\\n                    words:\'\',\\r\\n                    },\\r\\n                    rules:{\\r\\n                    },\\r\\n\\r\\n                }\\r\\n            },\\r\\n            watch:{\\r\\n            },\\r\\n            computed:{\\r\\n            },\\r\\n            methods: {\\r\\n                validate(){\\r\\n                    var b = false\\r\\n                    this.$refs.form.validate((valid) => {\\r\\n                        b = valid;\\r\\n                    });\\r\\n                    return b;\\r\\n                },\\r\\n                save() {\\r\\n                    var that = this;\\r\\n                    var success = false;\\r\\n                    var url = ms.manager + \\\"/mdiy/model/data/save.do\\\"\\r\\n                    if (that.form.id > 0) {\\r\\n                    url = ms.manager + \\\"/mdiy/model/data/update.do\\\";\\r\\n                    }\\r\\n                    this.$refs.form.validate((valid) => {\\r\\n                        if (valid) {\\r\\n                            var data = JSON.parse(JSON.stringify(that.form));\\r\\n                            data.modelId = that.modelId;\\r\\n                            ms.http.post(url, data).then(function (res) {\\r\\n                                if (res.data.id > 0) {\\r\\n                                    success = true;\\r\\n                                }\\r\\n                            });\\r\\n                        } else {\\r\\n                            return false;\\r\\n                        }\\r\\n                    })\\r\\n                    return success;\\r\\n                },\\r\\n                //获取当前意见反馈\\r\\n                get(id) {\\r\\n                    var that = this;\\r\\n                    ms.http.get(ms.manager + \\\"/mdiy/model/data.do\\\", {modelId:this.modelId,linkId:id}).then(function (res) {\\r\\n                            if(res.result&&res.data){\\r\\n                            that.form = res.data;\\r\\n                        }\\r\\n                    }).catch(function (err) {\\r\\n                        console.log(err);\\r\\n                    });\\r\\n                },\\r\\n            },\\r\\n            created() {\\r\\n                this.get(this.form.linkId);\\r\\n            }\\r\\n        });\\r\\n\\r\\n\"}', 1, 'mdiy_post_feedback', '意见反馈', NULL, 0, NULL, 0, NULL, 0, '[\r\n{\r\n            \"model\":\"name\",\r\n            \"key\":\"name\",\r\n            \"javaType\":\"String\",\r\n            \"jdbcType\":\"VARCHAR\",\r\n            \"name\":\"姓名\",\r\n            \"type\":\"input\"\r\n            }\r\n            ,{\r\n            \"model\":\"phone\",\r\n            \"key\":\"phone\",\r\n            \"javaType\":\"String\",\r\n            \"jdbcType\":\"VARCHAR\",\r\n            \"name\":\"手机\",\r\n            \"type\":\"input\"\r\n            }\r\n            ,{\r\n            \"model\":\"words\",\r\n            \"key\":\"words\",\r\n            \"javaType\":\"String\",\r\n            \"jdbcType\":\"VARCHAR\",\r\n            \"name\":\"留言\",\r\n            \"type\":\"textarea\"\r\n            }\r\n]', 'post');

-- ----------------------------
-- Table structure for mdiy_page
