widget.js
2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
const vm = new Vue({
el: '#zbxq',
data: {
ruleForm: {
region: '',
define: '',
zblx: '',
zbsx: '',
zbfw: '',
zbdw: '',
state: null,
},
rules: {
region: [
{ required: true, message: '不能为空', trigger: 'change' }
],
define: [
{ required: true, message: '不能为空', trigger: 'change' }
],
zblx: [
{ required: true, message: '不能为空', trigger: 'change' }
],
zbsx: [
{ required: true, message: '不能为空', trigger: 'change' }
],
zbfw: [
{ required: true, message: '不能为空', trigger: 'change' }
],
zbdw: [
{ required: true, message: '不能为空', trigger: 'change' }
],
},
mxpz: true,
value1: '',
tableData: [{
xh: '1',
zbtxlx: '规划实施综合评估体系',
yjfl: '协调',
ejfl: '城乡融合',
}, {
xh: '2',
zbtxlx: '规划实施专题监测预警体系',
yjfl: '经济发展',
ejfl: '————',
}, {
xh: '3',
zbtxlx: '规划实施综合评估体系',
yjfl: '协调',
ejfl: '城乡融合',
}],
dataIndex: 0,
status: 1,
input4: '',
zblb: ['生态保护红线', '城镇开发边界', '永久基本农田', '耕地保有量', '永久基本农田', '耕地保有量', '永久基本农田', '耕地保有量', '永久基本农田', '耕地保有量']
},
methods: {
cellStyle ({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
// 指定列号
return 'text-align:center'
} else {
return ''
}
},
contentzb (item, index) {
console.log(item)
console.log(index)
this.state = index
// console.log(a)
// if (this.state === index) {
// document.getElementsByClassName("liebiao").classList.add("color");
// }
},
submitForm (formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
alert('submit!');
} else {
console.log('error submit!!');
return false;
}
});
},
}
})