curd
This commit is contained in:
@@ -7,6 +7,52 @@ export default {
|
||||
console.log(param, 1)
|
||||
download(`${ExcelDownLoad}?param=${param}`)
|
||||
}
|
||||
// 用于生成传通讯服务器参数。
|
||||
// 传入参数
|
||||
// 1)type:11查询;12增删改,必须
|
||||
// 2)name:存储过程名,必须
|
||||
// 3)data:存储过程参数名和对应值,例如:
|
||||
// this.param[0] = ['设备类型编码', '3', 'string', '0']
|
||||
// this.param[1] = ['output', '3', 'int', '1'],必须
|
||||
// 数组里四个分别对应:存储过程参数名(必须);存储过程参数值(必须);参数类型(若是output必须);参数是否为output(0否1是)
|
||||
// 4)pageSize,pageList:分页使用,可选
|
||||
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',必须
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user