在alde创建html,PSALDETAI.html

案例信息

html, body {

margin: 0;

padding: 0;

height: 100%;

width: 100%;

background: #00499e;

}

#app {

padding: 20px;

border: 15px solid #00499e;

border-radius: 25px;

background: white;

min-height: 100%;

-webkit-box-sizing: border-box;

box-sizing: border-box;

max-width: 650px;

margin: auto;

}

.page-header {

color: #333;

margin-left: -10px;

margin-bottom: 20px;

font-size: 16px;

text-align: center;

}

.form-select {

width: 100%;

height: 40px;

}

.form-input {

width: 100%;

height: 40px;

}

#app .form-date {

width: 100%;

}

.form-btn {

width: 100%;

max-width: 400px;

margin-top: 10px;

}

.form-card {

width: 200px;

height: 160px;

border: 1px solid #efefef;

display: inline-block;

padding: 10px;

box-sizing: border-box;

-webkit-box-sizing: border-box;

border-radius: 8px;

-webkit-border-radius: 8px;

vertical-align: top;

line-height: 26px;

margin-right: 15px;

margin-bottom: 10px;

}

.form-card .el-icon-plus {

font-size: 30px;

margin-top: 55px;

margin-left: 75px;

color: #1379ff;

}

placeholder="请输入案例名称" maxlength="20">

{{formData.qxdmmc}}

{{formData.xxdmmc}}

{{formData.xuxm}}

{{formData.xtime}}

提 交

var pageparm = getQueryString("pageparm"),

formMap = {

xmdm: '项目代码',

alid: '案例id',

almc: '案例名称',

documents: '案例材料',

cllx: '材料类型',

clmc: '材料名称',

docfile: 'doc文档',

pdffile: 'pdf文档',

clsm: '说明',

qxdmmc: '案例区县名称',

xxdmmc: '案例学校名称',

xuid: '用户id',

xuxm: '用户姓名',

xtime: '更新时间'

};

new Vue({

el: '#app',

data: function () {

var that = this, validate = [

{

required: true,

validator(filed, val, callback) {

if (!val) {

callback(new Error(formMap[filed.fullField] + '不能为空'))

}

callback()

},

trigger: 'blur'

}

]

return {

title: '案例信息',

type: getQueryString("type"),

formMap,

baseUrl,

pzluserid: '',

fileData: {

act: 'afileid',

alid: getQueryString("alid")

},

types: {

cllxs: []

},

projectCodes: [],

formData: {

xmdm: '', // 项目代码

alid: '', // 案例id

almc: '', // 案例名称

qxdmmc: '',// 案例区县名称

xxdmmc: '',// 案例学校名称

xuid: '',// 用户id

xuxm: '',// 用户姓名

xtime: ''// 更新时间

},

rules: {

xmdm: validate, // 项目代码

almc: validate // 案例名称

}

}

},

computed: {

disabled () {

return this.type !== 'modify' && this.type !== 'add'

}

},

methods: {

back (){

history.back()

},

getProjects () {

let that = this

axios.get(baseUrl + 'PSAL/PSALDETAI', {params: {act: 'pinit'}}).then(function (res) {

if (res.status === 200) {

that.projectCodes = res.data.xmlist

that.pzluserid = res.data.pzluserid

that.title = res.data.mkmc || that.title

document.title = that.title

}

})

},

submit() {

var that = this

this.$refs.form.validate(function (flag) {

if (flag) {

var params = {

xmdm: that.formData.xmdm,

almc: that.formData.almc,

pzluserid: that.pzluserid,

act: that.type

}

if (that.type === 'modify') {

params.pageparm = that.fileData.alid

}

axios.get(baseUrl + 'PSAL/PSALDETAI', {params}).then(function (res) {

if (res.status === 200) {

if (params.act === 'add') {

location.href = './PSALDETAIDOC.html?alid=' + res.data.alid + '&type=add&redir=' + getQueryString('redir')

} else {

history.back()

}

}

})

}

})

},

getTypes (type) {

let that = this

return axios.get(baseUrl + 'xctrl/getdmjson/' + type).then(function (res) {

if (res.status === 200) {

that.types[type.split('-')[1] + 's'] = res.data

}

})

},

getInitData () {

let that = this

axios.get(baseUrl + 'PSAL/PSALDETAI', {params: {act: 'rdata', pageparm: that.fileData.alid}}).then(function (res) {

if (res.status === 200) {

for (var key in res.data[0]) {

if (res.data[0].hasOwnProperty(key)) {

that.formData[key.toLowerCase()] = res.data[0][key]

}

}

}

})

},

},

created() {

this.getTypes('anli-cllx')

this.getProjects()

if (this.type !== 'add') {

this.getInitData()

}

}

})

一键复制

编辑

Web IDE

原始数据

按行查看

历史

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值