Browse Source

提交电梯模板

master
xiaobai 3 years ago
parent
commit
68ca31cfb9
  1. 2
      package.json
  2. 10
      src/api/jyxm.js
  3. 37
      src/api/ysjl.js
  4. 53
      src/controller/jyxmController.js
  5. 29
      src/controller/ysjlController.js
  6. 50
      src/utils/table.js
  7. 1
      src/views/task/list.vue
  8. 785
      src/views/ysjl/3000/common/index.vue
  9. 242
      src/views/ysjl/3000/common/inspection-items.vue
  10. 267
      src/views/ysjl/3000/common/technical-parameter.vue
  11. 145
      src/views/ysjl/3000/dj/common/table.vue
  12. 183
      src/views/ysjl/3000/dj/common/table1.vue
  13. 175
      src/views/ysjl/3000/dj/yeyin/index.vue
  14. 7
      src/views/ysjl/3000/dj/yy/index.vue
  15. 55
      src/views/ysjl/3000/jj/wjf-yy/index.vue
  16. 55
      src/views/ysjl/3000/jj/yjf-yy/index.vue

2
package.json

@ -26,7 +26,7 @@
"clipboard": "^2.0.4", "clipboard": "^2.0.4",
"core-js": "^2.6.5", "core-js": "^2.6.5",
"downloadjs": "^1.4.7", "downloadjs": "^1.4.7",
"echarts": "5.1.1", "echarts": "^5.1.1",
"element-ui": "2.11.1", "element-ui": "2.11.1",
"file-saver": "2.0.1", "file-saver": "2.0.1",
"fuse.js": "3.4.4", "fuse.js": "3.4.4",

10
src/api/jyxm.js

@ -11,6 +11,16 @@ export default {
} }
}) })
}, },
getJdCyJyxm: (ysjlId, sort) => {
return api({
url: '/jyxm/getJdJyxmByYsjl',
method: 'get',
params: {
ysjlId: ysjlId,
orders: sort
}
})
},
getCyJyxmByYsjl: (ysjlId, isReport, sort) => { getCyJyxmByYsjl: (ysjlId, isReport, sort) => {
return api({ return api({
url: '/jyxm/getCyJyxmByYsjl', url: '/jyxm/getCyJyxmByYsjl',

37
src/api/ysjl.js

@ -4,9 +4,9 @@ import qs from 'qs'
export default { export default {
/** /**
* 初始化原始记录 * 初始化原始记录
* @param data * @param data
*/ */
initYsjl: (data) => { initYsjl: (data) => {
return api({ return api({
url: '/ysjl/initYsjl', url: '/ysjl/initYsjl',
@ -23,12 +23,12 @@ export default {
}) })
}, },
/** /**
* 获取原始记录 * 获取原始记录
* @param ysjlId * @param ysjlId
*/ */
getYsjl: (ysjlId) => { getYsjl: (ysjlId) => {
return api({ return api({
url: '/ysjl/getYsjlById', url: '/ysjl',
method: 'get', method: 'get',
params: { params: {
ysjlId: ysjlId ysjlId: ysjlId
@ -36,10 +36,10 @@ export default {
}) })
}, },
/** /**
* 获取参数 * 获取参数
* @param ysjlId * @param ysjlId
* @param sbzldm * @param sbzldm
*/ */
getParamByYsjlId: (ysjlId, sbzldm) => { getParamByYsjlId: (ysjlId, sbzldm) => {
return api({ return api({
url: '/ysjl/getParamByYsjlId', url: '/ysjl/getParamByYsjlId',
@ -78,7 +78,20 @@ export default {
} }
}) })
}, },
exportExcel exportExcel,
/**
* 获取附表
* @param ysjlId
*/
getYsjlFb: (ysjlId) => {
return api({
url: '/ysjl/getJyxmInfoByYsjl',
method: 'get',
params: {
ysjlId: ysjlId
}
})
}
} }
/** /**
* 办结报告重启申请保存备份 * 办结报告重启申请保存备份

53
src/controller/jyxmController.js

@ -4,14 +4,14 @@ import store from '@/store'
export default { export default {
/** /**
* 获取检验项目 * 获取检验项目
* @param modelId 模板主键起草时使用 * @param modelId 模板主键起草时使用
* @param ysjlId 原始记录主键更新时使用 * @param ysjlId 原始记录主键更新时使用
* @param sort 序号 * @param sort 序号
* @param state 创建状态还是更新状态 * @param state 创建状态还是更新状态
* @param isReport 是否是报告 * @param isReport 是否是报告
* @returns 检验项目 * @returns 检验项目
*/ */
getJyxm(modelId, ysjlId, sort, state, isReport = false) { getJyxm(modelId, ysjlId, sort, state, isReport = false) {
if (state === 'create') { if (state === 'create') {
return this.getCyJyxm(modelId, sort) return this.getCyJyxm(modelId, sort)
@ -20,19 +20,22 @@ export default {
} }
}, },
/** /**
* 获取检验项目 * 获取检验项目
* @param modelId 模板主键起草时使用 * @param modelId 模板主键起草时使用
* @param sort 序号 * @param sort 序号
* @returns 检验项目字典 * @returns 检验项目字典
*/ */
getCyJyxm(modelId, sort) { getCyJyxm(modelId, sort) {
return jyxm.getCyJyxm(modelId, sort) return jyxm.getCyJyxm(modelId, sort)
}, },
getJdCyJyxm(ysjlId, sort) {
return jyxm.getJdCyJyxm(ysjlId, sort)
},
/** /**
* 找到检验项或者检验目开始的第一条数据并进行签名 * 找到检验项或者检验目开始的第一条数据并进行签名
* @param selections * @param selections
* @param user * @param user
*/ */
findFirstJyxAndSignName(selections, arrayData, user) { findFirstJyxAndSignName(selections, arrayData, user) {
for (let i = 0; i < selections.length; i++) { for (let i = 0; i < selections.length; i++) {
for (let j = 0; j < arrayData.length; j++) { for (let j = 0; j < arrayData.length; j++) {
@ -57,10 +60,10 @@ export default {
} }
}, },
/** /**
* 宏观检验项目的签名 * 宏观检验项目的签名
* @param jyxm 宏观检验项目List的一行 * @param jyxm 宏观检验项目List的一行
* @param user 签名数据 * @param user 签名数据
*/ */
sign(jyxm, user) { sign(jyxm, user) {
// 不允许重复签名 // 不允许重复签名
if (user.id && jyxm.jianjianyuan && jyxm.jianjianyuan.toString().indexOf(user.id) !== -1) { if (user.id && jyxm.jianjianyuan && jyxm.jianjianyuan.toString().indexOf(user.id) !== -1) {
@ -74,10 +77,10 @@ export default {
} }
}, },
/** /**
* 初始化锅炉监督检验记录的检验项目 * 初始化锅炉监督检验记录的检验项目
* @param state 状态 * @param state 状态
* @param arrayData 检验项目数组 * @param arrayData 检验项目数组
*/ */
initJjyJyxm(state, arrayData) { initJjyJyxm(state, arrayData) {
if (state === 'create' || arrayData[0].jianjianyuan === null || arrayData[0].jianjianyuan === undefined) { if (state === 'create' || arrayData[0].jianjianyuan === null || arrayData[0].jianjianyuan === undefined) {
const jjy = store.getters.userId const jjy = store.getters.userId

29
src/controller/ysjlController.js

@ -2,27 +2,27 @@ import ysjl from '@/api/ysjl'
export default { export default {
/** /**
* 初始化原始记录 * 初始化原始记录
* @param data * @param data
* @returns {*} * @returns {*}
*/ */
init: (data) => { init: (data) => {
return ysjl.initYsjl(data) return ysjl.initYsjl(data)
}, },
/** /**
* 获取原始记录 * 获取原始记录
* @param ysjlId * @param ysjlId
* @returns {*} * @returns {*}
*/ */
getYsjl: (ysjlId) => { getYsjl: (ysjlId) => {
return ysjl.getYsjl(ysjlId) return ysjl.getYsjl(ysjlId)
}, },
/** /**
* 获取参数 * 获取参数
* @param ysjlId * @param ysjlId
* @param sbzldm * @param sbzldm
* @returns {Promise<void>} * @returns {Promise<void>}
*/ */
getParam: (ysjlId, sbzldm) => { getParam: (ysjlId, sbzldm) => {
return ysjl.getParamByYsjlId(ysjlId, sbzldm) return ysjl.getParamByYsjlId(ysjlId, sbzldm)
}, },
@ -38,5 +38,8 @@ export default {
}, },
getResetRecordsList: (ysjlId) => { getResetRecordsList: (ysjlId) => {
return ysjl.getResetRecordsList(ysjlId) return ysjl.getResetRecordsList(ysjlId)
},
getYsjlFb: (ysjlId) => {
return ysjl.getYsjlFb(ysjlId)
} }
} }

50
src/utils/table.js

@ -3,11 +3,11 @@ import common from '@/utils/common'
export default { export default {
/** /**
* 合并行与列 * 合并行与列
* @param cols 行与行之间合并的字段 * @param cols 行与行之间合并的字段
* @param rows 行内合并的字段 * @param rows 行内合并的字段
* @param tableData 需要合并的table * @param tableData 需要合并的table
*/ */
getData(cols, rows, tableData) { getData(cols, rows, tableData) {
const loca = [] // 行间合并 const loca = [] // 行间合并
const rowloca = [] // 行内合并 const rowloca = [] // 行内合并
@ -86,13 +86,13 @@ export default {
} }
}, },
/** /**
* 合并行合并列 * 合并行合并列
* @param row * @param row
* @param column * @param column
* @param rowIndex * @param rowIndex
* @param columnIndex * @param columnIndex
* @returns {{colspan: number, rowspan: (number|*)}|{colspan: number, rowspan: number}} * @returns {{colspan: number, rowspan: (number|*)}|{colspan: number, rowspan: number}}
*/ */
mergeColRows({ row, column, rowIndex, columnIndex }) { mergeColRows({ row, column, rowIndex, columnIndex }) {
// 遍历本行合并表 // 遍历本行合并表
const spans = { const spans = {
@ -126,10 +126,10 @@ export default {
return spans return spans
}, },
/** /**
* 添加行 * 添加行
* @param tableData$refs * @param tableData$refs
* @param row 默认行数据如果C1为true那么则将C1的数值转换为索引值如果不给则默认为{} * @param row 默认行数据如果C1为true那么则将C1的数值转换为索引值如果不给则默认为{}
*/ */
addRow(tableData$refs, row) { addRow(tableData$refs, row) {
if (!row) { // 如果没有给出每行默认值时 if (!row) { // 如果没有给出每行默认值时
row = {} row = {}
@ -149,15 +149,15 @@ export default {
}, 10) // 用于延时渲染后选中这行 }, 10) // 用于延时渲染后选中这行
}, },
/** /**
* 删除行需要保证每一行都有一个index属性 * 删除行需要保证每一行都有一个index属性
* 建议使用方法index列要有这个属性 :index="indexMethod" * 建议使用方法index列要有这个属性 :index="indexMethod"
* 建议方法内容 * 建议方法内容
* indexMethod(index) { * indexMethod(index) {
this.tableData[index].index = index this.tableData[index].index = index
return (index + 1) return (index + 1)
} }
* @param tableData$refs * @param tableData$refs
*/ */
delRow(tableData$refs) { delRow(tableData$refs) {
if (tableData$refs.selection.length === 0) { if (tableData$refs.selection.length === 0) {
Vue.prototype.$message({ Vue.prototype.$message({

1
src/views/task/list.vue

@ -526,6 +526,7 @@ export default {
} }
this.sbxxList.sblbdm = this.shebeileibiedaima this.sbxxList.sblbdm = this.shebeileibiedaima
this.sbxxList.sbpzdm = this.shebeipinzhongdaima this.sbxxList.sbpzdm = this.shebeipinzhongdaima
console.log(this.path + '/null')
this.$router.push({ this.$router.push({
path: this.path + '/null', path: this.path + '/null',
query: { query: {

785
src/views/ysjl/elevator/common/index.vue → src/views/ysjl/3000/common/index.vue

File diff suppressed because it is too large

242
src/views/ysjl/3000/common/inspection-items.vue

@ -0,0 +1,242 @@
<template>
<div class="app-container">
<el-table
ref="bgfyData"
:data="bgfyData"
:span-method="tableJs.mergeColRows"
border
stripe
style="margin-top: 10px"
>
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column
align="center"
width="50"
label="检验类别"
prop="xiangmuleibie"
/>
<el-table-column
align="center"
width="150"
label="项目"
prop="jianyanxiang"
/>
<el-table-column
align="center"
width="50"
label="项目编号"
prop="jianyanmu"
/>
<el-table-column align="center" label="检验项目及内容" prop="jianyanneirong" />
<el-table-column
align="center"
prop="jianyanjieguo"
width="120"
label="检查结果"
>
<template slot-scope="scope">
<el-select
v-model="scope.row.jianyanjieguo"
>
<el-option
v-for="item in jyjgList"
:key="item"
:label="item"
:value="item"
/>
</el-select>
</template>
</el-table-column>
<!-- <el-table-column
align="center"
prop="gongzuojianzheng"
min-width="200"
label="检验结论"
>
<template slot-scope="scope">
<el-autocomplete
v-model="scope.row.gongzuojianzheng"
class="inline-input"
style="width: 100%"
:fetch-suggestions="
(queryString, cb) => {
querySearchGzjz(queryString, cb, scope.$index);
}
"
/>
</template>
</el-table-column> -->
</el-table>
</div>
</template>
<script>
// import Technical from '@/views/ysjl/3000/common/technical-parameter'
export default {
name: 'Inspection',
components: {},
props: {
bgfyData: {
type: Array,
require: true,
default: () => []
}
},
data() {
return {
jyjgList: ['√', 'X', '/']
}
},
created() {
},
mounted() {},
methods: {
/**
* 是否可编辑
* @param $index
* @returns {number}
*/
showXmlb($index) {
return this.showXmlbIndexListSg.filter((xl) => {
return xl.index === $index
}).length
},
/**
* 根据索引找到对应的项目类别选项列表
* @param $index
*/
getXmlbList($index) {
for (let i = 0; i < this.showXmlbIndexListSg.length; i++) {
const xl = this.showXmlbIndexListSg[i]
if (xl.index === $index) {
return xl.xmlb === 'AB'
? this.xmlbListAB
: xl.xmlb === 'AC'
? this.xmlbListAC
: this.xmlbListBC
}
}
},
/**
* 修改检验项目关联的检验结果及确认日期为监检日期
* @param $index 检验项目索引
*/
changeJyjg($index) {
//
const isWcx = this.bgfyData[$index].jianyanjieguo === '无此项'
const isWx = this.bgfyData[$index].jianyanjieguo === '外协'
if (isWcx) {
this.bgfyData[$index].gongzuojianzheng = '—'
}
if (isWx) {
this.bgfyData[$index].gongzuojianzheng = '外协部件监检证书'
}
if (isWcx || isWx) {
this.bgfyData[$index].querenriqi =
this.formatter.dateFormat('YYYY-MM-dd')
} else {
this.bgfyData[$index].gongzuojianzheng = this.dicGzjz[$index].value
this.bgfyData[$index].querenriqi = this.ysjl.jianyanjieshuriqi
}
//
const jyxm = this.jyxmRelations.filter(
(jyxm) => jyxm.index === $index
)[0]
//
if (!jyxm) {
return
}
//
//
jyxm.relationIds.forEach((index) => {
this.bgfyData[index].jianyanjieguo =
this.bgfyData[$index].jianyanjieguo
if (isWcx || isWx) {
this.bgfyData[index].gongzuojianzheng =
this.bgfyData[$index].gongzuojianzheng
this.bgfyData[index].querenriqi = this.bgfyData[$index].querenriqi
} else {
this.bgfyData[index].gongzuojianzheng = this.dicGzjz[index].value
this.bgfyData[index].querenriqi = this.ysjl.jianyanjieshuriqi
}
})
},
onRowClick(row) {
this.$refs.bgfyData.toggleRowSelection(row)
},
/**
* 修改检验项目关联的确认日期
* @param $index 检验项目索引
*/
changeQrrq: function($index) {
//
if (!this.bgfyData[$index].querenriqi) {
return
}
//
const jyxm = this.jyxmRelations.filter(
(jyxm) => jyxm.index === $index
)[0]
//
if (!jyxm) {
return
}
//
jyxm.relationIds.forEach((index) => {
//
if (!this.bgfyData[index].querenriqi) {
this.bgfyData[index].querenriqi = this.bgfyData[$index].querenriqi
}
})
},
querySearchGzjz: function(queryString, cb, $index) {
cb([this.dicGzjz[$index]])
}
}
}
</script>
<style scoped>
.el-tag {
margin: auto 5px;
}
/* 表格边框样式 */
>>> .el-table td,
>>> .el-table th.is-leaf,
.el-table--border,
.el-table--group {
border-color: black;
}
/* 多级表头样式 */
>>> .el-table--border th,
>>> .el-table--border th.gutter:last-of-type {
border-bottom: 1px solid black;
border-right: 1px solid black;
}
/* 表格字体增亮色 */
>>> .el-table--border::after,
>>> .el-table--group::after,
>>> .el-table::before {
background-color: black;
}
>>> .el-table thead,
.el-table {
color: black;
}
</style>
<style lang="scss" scoped>
/*.el-table/deep/ td, .el-table/deep/ th.is-leaf,.el-table--border,.el-table--group{
border-color: black;
}*/
.el-table {
/deep/tbody tr:hover > td {
background-color: oldlace;
}
}
</style>

267
src/views/ysjl/3000/common/technical-parameter.vue

@ -0,0 +1,267 @@
<!--锅炉改造和重大修理-->
<template>
<div class="app-container">
<el-form
ref="ysjl"
:model="ysjl"
class="el-form"
label-position="right"
label-width="130px"
>
<fieldset>
<legend>设备技术参数</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定载重量" prop="edingzaizhongliang">
<el-input v-model="param.edingzaizhongliang" type="text" />kg
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="额定速度" prop="edingsudu">
<el-input
v-model="param.edingsudu"
type="text"
disabled
@input="beforeHejia"
/>m/s
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="层站门数" prop="cnegzhanmenshu">
<el-input
v-model="param.ceng"
type="text"
style="width: 50px"
/>
<el-input
v-model="param.zhan"
type="text"
style="width: 50px"
/>
<el-input
v-model="param.men"
type="text"
style="width: 50px"
/>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="控制方式" prop="kongzhifangshi">
<el-input v-model="param.kongzhifangshi" type="text" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>主要检验仪器和设备</legend>
<el-row :gutter="20">
<el-col :span="20">
<el-input
v-model="ysjl.jianyanyiju"
style="width: 450px"
/>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="20">
<el-form-item label="检验结论" prop="jianyanjielun">
<el-radio-group v-model="jianyanjielun">
<el-radio :label="合格">
备选项
</el-radio>
<el-radio :label="不合格">
备选项
</el-radio>
<el-radio :label="复检合格">
备选项
</el-radio>
<el-radio :label="复检不合格">
备选项
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="备注" prop="remark">
<el-input
v-model="param.remark"
type="textarea"
:disabled="edit"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="margin: 20px 0">
<el-col :span="8">
<el-form-item label="现场检验日期" prop="xianchangjianyanriqi">
<el-date-picker
v-model="param.xianchangjianyanriqi"
value-format="yyyy-MM-dd"
placeholder="选择日期"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="检验完成日期" prop="jianyanwanchengriqi">
<el-date-picker
v-model="param.jianyanwanchengriqi"
value-format="yyyy-MM-dd"
placeholder="选择日期"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="下次检验日期" prop="xiacijianyanriq">
<el-date-picker
v-model="param.xiacijianyanriq"
value-format="yyyy-MM-dd"
placeholder="选择日期"
style="width: 100%"
/>
</el-form-item>
</el-col>
</el-row>
<template>
<el-row :gutter="20" style="margin-bottom: 20px; height: 90px">
<el-col :span="18">
<el-form-item label="说明" prop="beizhu">
<el-input v-model="ysjl.beizhu" type="textarea" :rows="4" />
</el-form-item>
</el-col>
</el-row>
</template>
<template>
<el-row :gutter="20" style="margin-top: 20px">
<el-col :span="8">
<el-form-item label="校核" prop="jianyanjieshuriqi">
<el-date-picker
v-model="ysjl.jianyanjieshuriqi"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<sign-name
:jianyanrenyuan="jianyanrenyuan"
:ysjl="ysjl"
:custom-clear-sign="customClearSign"
@setSignValue="signNameValue"
/>
</el-col>
<el-col :span="8">
<el-form-item label="日期" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
<el-col :span="8">
<sign-name
:jianyanrenyuan="jianyanrenyuan"
:ysjl="ysjl"
:custom-clear-sign="customClearSign"
@setSignValue="signNameValue"
/>
</el-col>
<el-col :span="8">
<el-form-item label="日期" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
</el-row>
</template>
</fieldset>
</el-form>
</div>
</template>
<script>
export default {
name: 'Technical',
props: {
type: {
required: true,
type: String
},
showXmlbIndexListSg: {
required: true,
type: Array
},
/**
* 格式为 [{ index: 0, relationIds: [1, 2] }]
*/
jyxmRelations: {
required: true,
type: Array
}
},
data() {
return {
}
},
created() {
},
methods: {
}
}
</script>
<style scoped>
.el-tag {
margin: auto 5px;
}
/* 表格边框样式 */
>>> .el-table td,
>>> .el-table th.is-leaf,
.el-table--border,
.el-table--group {
border-color: black;
}
/* 多级表头样式 */
>>> .el-table--border th,
>>> .el-table--border th.gutter:last-of-type {
border-bottom: 1px solid black;
border-right: 1px solid black;
}
/* 表格字体增亮色 */
>>> .el-table--border::after,
>>> .el-table--group::after,
>>> .el-table::before {
background-color: black;
}
>>> .el-table thead,
.el-table {
color: black;
}
</style>
<style lang="scss" scoped>
/*.el-table/deep/ td, .el-table/deep/ th.is-leaf,.el-table--border,.el-table--group{
border-color: black;
}*/
.el-table {
/deep/tbody tr:hover > td {
background-color: oldlace;
}
}
</style>

145
src/views/ysjl/3000/dj/common/table.vue

@ -0,0 +1,145 @@
<template>
<div class="app-container">
<div class="searchBox">
<el-button type="primary" @click="addtable">
新增
</el-button>
<el-button type="danger" @click="deleteFn">
删除
</el-button>
</div>
<el-table
:data="tableData"
style="width: 100%"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
/>
<el-table-column
v-for="(item, index) in tabelHeader"
:key="index"
:prop="item.prop"
:label="item.label"
>
<template v-if="item.type==1" slot-scope="scope">
<el-autocomplete
v-model="scope.row[scope.column.property]"
class="inline-input"
:fetch-suggestions="querySearch"
placeholder="请输入内容"
@select="handleSelect"
/>
</template>
<el-table-column v-for="(k, i) in item.child" :key="i" :label="k.label" :prop="k.prop">
<template slot-scope="scope">
<el-autocomplete
v-model="scope.row[scope.column.property]"
class="inline-input"
:fetch-suggestions="querySearch"
placeholder="请输入内容"
@select="handleSelect"
/>
</template>
</el-table-column>
</el-table-column>
</el-table>
</div>
</template>
<script>
export default {
name: 'Table',
components: { },
props: {
tabelHeader: {
type: Array,
require: true,
default: () => {
return []
}
},
tableData: {
type: Array,
require: true,
default: () => {
return []
}
}
},
data() {
return {
type: '1',
options: [
{
value: '√',
id: '1'
},
{
value: 'X',
id: '2'
},
{
value: '/',
id: '3'
}
],
multipleSelection: []
}
},
computed: {},
created() {},
methods: {
handleSelectionChange(val) {
console.log(val)
this.multipleSelection = val
},
querySearch(queryString, cb) {
var restaurants = this.options
var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
// callback
cb(results)
},
createFilter(queryString) {
return (restaurant) => {
return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
}
},
handleSelect(item) {
console.log(item)
},
addtable() {
this.$emit('addfn')
},
deleteFn() {
if (this.multipleSelection.length === 0) {
this.$alert('请先选择要删除的数据', '提示', {
confirmButtonText: '确定'
})
} else {
this.multipleSelection.forEach((val, index) => {
console.log(val)
//
this.tableData.forEach((v, i) => {
console.log(v)
//
if (val.id === v.id) {
this.tableData.splice(i, 1)
}
})
})
}
}
}
}
</script>
<style scoped>
.searchBox{
display: flex;
flex-direction: row;
margin-bottom: 20px;
}
</style>

183
src/views/ysjl/3000/dj/common/table1.vue

@ -0,0 +1,183 @@
<template>
<div class="app-container">
<el-table :data="tableData" style="width: 100%" border>
<el-table-column label="电动机电流载重量百分比" prop="name" />
<el-table-column label="30%" prop="D5">
<template slot-scope="scope">
<el-input v-model="scope.row.D5" />
</template>
</el-table-column>
<el-table-column label="40%" prop="D4">
<template slot-scope="scope">
<el-input v-model="scope.row.D4" />
</template>
</el-table-column>
<el-table-column label="45%" prop="D3">
<template slot-scope="scope">
<el-input v-model="scope.row.D3" />
</template>
</el-table-column>
<el-table-column label="50%" prop="D2">
<template slot-scope="scope">
<el-input v-model="scope.row.D2" />
</template>
</el-table-column>
<el-table-column label="60%" prop="D1">
<template slot-scope="scope">
<el-input v-model="scope.row.D1" />
</template>
</el-table-column>
</el-table>
<div id="chart" style="width:600px;height:500px;margin-top:50px" />
</div>
</template>
<script>
import * as echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
export default {
name: 'Table',
components: {},
props: {
tabelHeader: {
type: Array,
require: true,
default: () => {
return []
}
},
tableData: {
type: Array,
require: true,
default: () => {
return []
}
},
pic: {
type: String,
require: true,
default: ''
}
},
data() {
return {
type: '1',
options: [
{
value: '√',
id: '1'
},
{
value: 'X',
id: '2'
},
{
value: '/',
id: '3'
}
],
multipleSelection: [],
data: [],
data1: [],
imgPath: ''
}
},
computed: {},
watch: {
tableData: {
handler: function(val) {
this.data = Object.values(val[0]).slice(1)
this.data1 = Object.values(val[1]).slice(1)
this.initChart()
},
deep: true
}
},
created() {
this.tableData = [
{
name: '上行(A)',
D1: '',
D2: '',
D3: '',
D4: '',
D5: ''
},
{
name: '下行(A)',
D1: '',
D2: '',
D3: '',
D4: '',
D5: ''
}
]
},
mounted() {
this.initChart()
},
methods: {
initChart() {
const myChart = echarts.init(document.getElementById('chart'))
const option = {
title: {
text: '电流(A)'
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['上行', '下行']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['0', '10', '20', '30', '40', '45', '50', '60']
},
yAxis: {
type: 'value'
},
series: [
{
name: '上行',
type: 'line',
stack: '总量',
data: this.data
},
{
name: '下行',
type: 'line',
stack: '总量',
data: this.data1
}
]
}
myChart.setOption(option)
this.imgPath = myChart.getDataURL({
type: 'png',
pixelRatio: 1,
backgroundColor: '#fff'
})
}
}
}
</script>
<style scoped>
.searchBox {
display: flex;
flex-direction: row;
margin-bottom: 20px;
}
</style>

175
src/views/ysjl/3000/dj/yeyin/index.vue

@ -0,0 +1,175 @@
<template>
<div class="app-container">
<baseInfo :from-type="type" :array-group="arrayGroup" />
</div>
</template>
<script>
import baseInfo from '@/views/ysjl/3000/common/index'
export default {
name: 'ElevatorYeyin',
components: { baseInfo },
data() {
return {
type: '1',
arrayGroup: [
{
header: [
{
label: '层站',
prop: 'D7',
type: 1
},
{
label: '3.7 轿厢与井道壁距离单位:m)',
prop: 'D6',
type: 1
},
{
label: '按20%抽查的项目',
type: 2,
child: [
{
label: '6.6门的运行和导向',
prop: 'D5',
type: 1
},
{
label: '6.7自动关闭层门装置',
prop: 'D4',
type: 1
},
{
label: '6.8紧急开锁装置',
prop: 'D3',
type: 1
},
{
label: '6.9 门的锁紧',
prop: 'D2',
type: 1
},
{
label: '6.10门的闭合',
prop: 'D1',
type: 1
}
]
}
],
data: []
},
{
header: [
{
label: '层站',
prop: 'D8',
type: 1
},
{
label: '6.3施力层门间隙',
prop: 'D7',
type: 1
},
{
label: '6.3门扇与门扇',
prop: 'D6',
type: 1
},
{
label: '6.3门扇与门楣',
prop: 'D5',
type: 1
},
{
label: '6.3门扇与地坎',
prop: 'D4',
type: 1
},
{
label: '6.9门锁啮合长度',
prop: 'D3',
type: 1
},
{
label: '6.12门刀与层门地坎间距',
prop: 'D2',
type: 1
},
{
label: '6.12门锁滚轮与轿门地坎间距',
prop: 'D1',
type: 1
}
],
data: []
}
],
tableHeader2: [
{
label: '电动机电流载重量百分比',
type: 1
},
{
label: '30%',
prop: 'D1',
type: 1
},
{
label: '40%',
prop: 'D2',
type: 1
},
{
label: '45%',
prop: 'D3',
type: 1
},
{
label: '50%',
prop: 'D4',
type: 1
},
{
label: '60%',
prop: 'D5',
type: 1
}
],
list: [],
list1: []
}
},
computed: {},
created() {},
methods: {}
}
</script>
<style>
.el-input__inner {
border: 1px solid #00000075;
border-radius: 4px;
}
.el-textarea__inner {
border: 1px solid #91393975;
border-radius: 4px;
}
.el-form-item__error {
padding-top: 0;
position: absolute;
}
.el-input.is-disabled .el-input__inner {
color: #606266;
}
.el-textarea.is-disabled .el-textarea__inner {
color: #606266;
}
.el-dialog__body {
padding-top: 10px;
}
.myTable .el-input__inner {
padding: 0 5px;
text-align: center;
}
</style>

7
src/views/ysjl/elevator/yeyin/index.vue → src/views/ysjl/3000/dj/yy/index.vue

@ -1,16 +1,17 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<baseInfo /> <baseInfo :from-type="type" />
</div> </div>
</template> </template>
<script> <script>
import baseInfo from '@/views/ysjl/elevator/common/index' import baseInfo from '@/views/ysjl/3000/common/index'
export default { export default {
name: 'ElevatorYeyin', name: 'ElevatorYeyin',
components: { baseInfo }, components: { baseInfo },
data() { data() {
return { return {
type: '1'
} }
}, },
computed: { computed: {

55
src/views/ysjl/3000/jj/wjf-yy/index.vue

@ -0,0 +1,55 @@
<template>
<div class="app-container">
<baseInfo :from-type="type" :table-header="tableHeader" :list="list" :num="3" />
</div>
</template>
<script>
import baseInfo from '@/views/ysjl/3000/common/index'
export default {
name: 'ElevatorYeyin',
components: { baseInfo },
data() {
return {
type: '2'
}
},
computed: {
},
created() {
},
methods: {
}
}
</script>
<style>
.el-input__inner {
border: 1px solid #00000075;
border-radius: 4px;
}
.el-textarea__inner {
border: 1px solid #91393975;
border-radius: 4px;
}
.el-form-item__error {
padding-top: 0;
position: absolute;
}
.el-input.is-disabled .el-input__inner {
color: #606266;
}
.el-textarea.is-disabled .el-textarea__inner {
color: #606266;
}
.el-dialog__body {
padding-top: 10px;
}
.myTable .el-input__inner{
padding: 0 5px;
text-align: center;
}
</style>

55
src/views/ysjl/3000/jj/yjf-yy/index.vue

@ -0,0 +1,55 @@
<template>
<div class="app-container">
<baseInfo :from-type="type" />
</div>
</template>
<script>
import baseInfo from '@/views/ysjl/3000/common/index'
export default {
name: 'ElevatorYeyin',
components: { baseInfo },
data() {
return {
type: '2'
}
},
computed: {
},
created() {
},
methods: {
}
}
</script>
<style>
.el-input__inner {
border: 1px solid #00000075;
border-radius: 4px;
}
.el-textarea__inner {
border: 1px solid #91393975;
border-radius: 4px;
}
.el-form-item__error {
padding-top: 0;
position: absolute;
}
.el-input.is-disabled .el-input__inner {
color: #606266;
}
.el-textarea.is-disabled .el-textarea__inner {
color: #606266;
}
.el-dialog__body {
padding-top: 10px;
}
.myTable .el-input__inner{
padding: 0 5px;
text-align: center;
}
</style>
Loading…
Cancel
Save