This commit is contained in:
Vergil
2020-03-03 16:06:30 +08:00
parent c57732671c
commit 2df8f34a7f
2 changed files with 53 additions and 8 deletions

View File

@@ -7,6 +7,52 @@ export default {
console.log(param, 1)
download(`${ExcelDownLoad}?param=${param}`)
}
// 用于生成传通讯服务器参数。
// 传入参数
// 1type11查询12增删改必须
// 2name存储过程名必须
// 3data存储过程参数名和对应值例如
// this.param[0] = ['设备类型编码', '3', 'string', '0']
// this.param[1] = ['output', '3', 'int', '1'],必须
// 数组里四个分别对应存储过程参数名必须存储过程参数值必须参数类型若是output必须参数是否为output0否1是
// 4pageSizepageList分页使用可选
Vue.prototype.CreateData = function(type, name, data, pageSize, pageList) {
var param_Str = ''
var param_array = []
if (type === '7') {
data.map(v => {
pageSize.map(h => {
const val = h.toString()
if (!v[val]) {
this.$set(v, val, '')
}
})
})
param_Str = data
} else {
if (data !== undefined) {
for (let i = 0; i < data.length; i++) {
param_array.push({
name: data[i][0],
value: data[i][1],
type: data[i][2],
output: data[i][3]
})
}
param_Str = JSON.stringify(param_array)
}
}
var obj = []
obj[0] = {}
obj[0].type = type
obj[0].name = name
obj[0].param = param_Str
obj[0].pageSize = pageSize
obj[0].pageList = pageList
var numn = JSON.stringify(obj[0])
return numn
}
// 高精原CreateData
Vue.prototype.CreateData = function(type, name, data, pageSize, pageList) {
var paramStr = ''
var paramarray = []
@@ -31,6 +77,7 @@ export default {
var numn = JSON.stringify(obj[0])
return numn
}
// 用于打开增加框,方法能重置表单,并使表单内容回到初始化状态。
// 传入参数
// 1表单名称字符串形式如'form',必须

View File

@@ -16,7 +16,7 @@
<el-button size="small" type="warning" style="margin-right: 50px" plain @click="exportOut()">导出日点检表</el-button>
</div>
</div>
<el-table v-loading="loading1" :data="tableData1" stripe height="200" highlight-current-row border>
<el-table v-loading="loading1" :data="tableData1" stripe height="200" border>
<el-table-column align="center" label="序号" type="index" width="50"/>
<el-table-column align="center" label="工位号" width="110">
<template slot-scope="scope">
@@ -49,7 +49,7 @@
<el-card>
<div>点检类型点检内容维护</div>
<el-col :span="6">
<el-table v-loading="loading2" :data="tableData2" stripe height="300" highlight-current-row border @row-click="getTableData3">
<el-table v-loading="loading2" :data="tableData2" height="300" highlight-current-row border @row-click="getTableData3">
<el-table-column align="center" label="序号" type="index" width="50"/>
<el-table-column align="center" label="点检类型名称" min-width="150">
<template slot-scope="scope">
@@ -59,10 +59,9 @@
<span v-else>{{ scope.row.点检表类型名称 }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="160">
<el-table-column align="center" label="操作" width="120">
<template slot="header" slot-scope="scope">
<!--<el-button size="mini" type="primary" icon="el-icon-circle-plus-outline" @click="handleAdd1('form1')">新增</el-button>-->
<el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()" >新增</el-button>
<el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="handleAdd1('form1')" >新增</el-button>
</template>
<template slot-scope="scope">
<el-button v-if="scope.row.edit" type="text" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit1(scope.row)">确定</el-button>
@@ -104,10 +103,9 @@
<span v-else>{{ scope.row.保养项目 }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="160">
<el-table-column align="center" label="操作" width="120">
<template slot="header" slot-scope="scope">
<!--<el-button size="mini" type="primary" icon="el-icon-circle-plus-outline" @click="handleAdd2('form2')">新增</el-button>-->
<el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()" >新增</el-button>
<el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="handleAdd2('form2')" >新增</el-button>
</template>
<template slot-scope="scope">
<el-button v-if="scope.row.edit" type="text" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit2(scope.row)">确定</el-button>