Browse Source

优化调整中

master
李磊 3 years ago
parent
commit
af1c13daad
  1. 4
      src/api/ysjl.js
  2. 2
      src/components/Charts/MixBar.vue
  3. 2
      src/components/Charts/MixChart.vue
  4. 2
      src/components/Charts/MixCharts.vue
  5. 4
      src/controller/ysjlController.js
  6. 0
      src/utils/mixins/resize.js
  7. 7
      src/views/task/list.vue
  8. 385
      src/views/ysjl/3000/common/index.vue
  9. 129
      src/views/ysjl/3000/dj/common/phxsb.vue
  10. 24
      src/views/ysjl/3000/dj/common/table.vue
  11. 43
      src/views/ysjl/3000/dj/common/zdftFb.vue
  12. 2
      src/views/ysjl/3000/dj/yeyin/index.vue
  13. 2
      src/views/ysjl/3000/dj/yy/index.vue
  14. 2
      src/views/ysjl/3000/dj/zdft/index.vue
  15. 2
      src/views/ysjl/3000/jj/wjf-yy/index.vue
  16. 2
      src/views/ysjl/3000/jj/yjf-yy/index.vue
  17. 2
      src/views/ysjl/3000/jj/yy-jj/index.vue

4
src/api/ysjl.js

@ -80,10 +80,10 @@ export default {
}, },
exportExcel, exportExcel,
/** /**
* 获取附表 * 查询原始记录检验项目检验项目存储时的所有信息不拼接字典列数据
* @param ysjlId * @param ysjlId
*/ */
getYsjlFb: (ysjlId) => { getJyxmInfoByYsjl: (ysjlId) => {
return api({ return api({
url: '/jyxm/getJyxmInfoByYsjl', url: '/jyxm/getJyxmInfoByYsjl',
method: 'get', method: 'get',

2
src/components/Charts/MixBar.vue

@ -4,7 +4,7 @@
<script> <script>
import * as echarts from 'echarts' import * as echarts from 'echarts'
import resize from './mixins/resize' import resize from '@/utils/mixins/resize'
export default { export default {
name: 'MixBar', name: 'MixBar',

2
src/components/Charts/MixChart.vue

@ -4,7 +4,7 @@
<script> <script>
import * as echarts from 'echarts' import * as echarts from 'echarts'
import resize from './mixins/resize' import resize from '@/utils/mixins/resize'
export default { export default {
mixins: [resize], mixins: [resize],
props: { props: {

2
src/components/Charts/MixCharts.vue

@ -4,7 +4,7 @@
<script> <script>
import * as echarts from 'echarts' import * as echarts from 'echarts'
import resize from './mixins/resize' import resize from '@/utils/mixins/resize'
export default { export default {
name: 'MixBar', name: 'MixBar',

4
src/controller/ysjlController.js

@ -39,7 +39,7 @@ export default {
getResetRecordsList: (ysjlId) => { getResetRecordsList: (ysjlId) => {
return ysjl.getResetRecordsList(ysjlId) return ysjl.getResetRecordsList(ysjlId)
}, },
getYsjlFb: (ysjlId) => { getJyxmInfoByYsjl: (ysjlId) => {
return ysjl.getYsjlFb(ysjlId) return ysjl.getJyxmInfoByYsjl(ysjlId)
} }
} }

0
src/components/Charts/mixins/resize.js → src/utils/mixins/resize.js

7
src/views/task/list.vue

@ -305,13 +305,6 @@ export default {
console.log(data.list) console.log(data.list)
this.list = data.list this.list = data.list
this.totalCount = data.total this.totalCount = data.total
const messagePush = this.$store.getters.messageCount
for (let i = 0; i < messagePush.length; i++) {
if (messagePush[i].key === 'MyTask') {
messagePush[i].value = this.totalCount
}
this.$store.state.messageCount = messagePush
}
}) })
}, },
getListCopy() { getListCopy() {

385
src/views/ysjl/3000/common/index.vue

@ -188,7 +188,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="fromType == 1||fromType==5||fromType==3" :gutter="20"> <el-row v-if="fromType === 1 || fromType === 5 || fromType === 3" :gutter="20">
<el-col :span="18"> <el-col :span="18">
<el-form-item label="使用单位名称" prop="shiyongdanwei"> <el-form-item label="使用单位名称" prop="shiyongdanwei">
<el-input <el-input
@ -199,7 +199,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="fromType == 2 ||fromType == 4" :gutter="20"> <el-row v-if="fromType === 2 || fromType === 4" :gutter="20">
<el-col :span="18"> <el-col :span="18">
<el-form-item <el-form-item
label="施工单位名称" label="施工单位名称"
@ -213,7 +213,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="fromType == 2 ||fromType == 4" :gutter="20"> <el-row v-if="fromType === 2 || fromType === 4" :gutter="20">
<el-col :span="9"> <el-col :span="9">
<el-form-item <el-form-item
label="施工单位许可证编号" label="施工单位许可证编号"
@ -236,7 +236,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="fromType == 2" :gutter="20"> <el-row v-if="fromType === 2" :gutter="20">
<el-col :span="18"> <el-col :span="18">
<el-form-item label="安装地点" prop="anzhuangdidian"> <el-form-item label="安装地点" prop="anzhuangdidian">
<el-input <el-input
@ -290,7 +290,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="fromType == 1 ||fromType == '5'" :gutter="20"> <el-row v-if="fromType === 1 ||fromType === 5" :gutter="20">
<el-col :span="18"> <el-col :span="18">
<el-form-item label="注册代码" prop="zhucedaima"> <el-form-item label="注册代码" prop="zhucedaima">
<el-input <el-input
@ -353,7 +353,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="fromType == 2" :gutter="20"> <el-row v-if="fromType === 2" :gutter="20">
<el-col :span="9"> <el-col :span="9">
<el-form-item label="联系人" prop="lianxiren"> <el-form-item label="联系人" prop="lianxiren">
<el-input <el-input
@ -386,7 +386,7 @@
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="9"> <el-col :span="9">
<el-form-item v-if="fromType==5" label="维护保养单位电话" prop="weibaodanweiDianhua"> <el-form-item v-if="fromType === 5" label="维护保养单位电话" prop="weibaodanweiDianhua">
<el-input <el-input
v-model="ysjl.weibaodanweiDianhua" v-model="ysjl.weibaodanweiDianhua"
type="text" type="text"
@ -411,7 +411,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="fromType!=='5'" :gutter="20"> <el-row v-if="fromType !== 5" :gutter="20">
<el-col :span="18"> <el-col :span="18">
<el-form-item label="现场检验条件" prop="xianchangjianyantiaojian"> <el-form-item label="现场检验条件" prop="xianchangjianyantiaojian">
<el-radio-group v-model="ysjl.xianchangjianyantiaojian"> <el-radio-group v-model="ysjl.xianchangjianyantiaojian">
@ -426,7 +426,7 @@
</el-col> </el-col>
</el-row> </el-row>
</fieldset> </fieldset>
<fieldset v-if="fromType !=='5'"> <fieldset v-if="fromType !== 5">
<legend>设备技术参数</legend> <legend>设备技术参数</legend>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="9"> <el-col :span="9">
@ -437,7 +437,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item v-if="fromType==4" label="额定速度"> <el-form-item v-if="fromType === 4" label="额定速度">
<el-input v-model="param.edingsuduShangxing" type="text"> <el-input v-model="param.edingsuduShangxing" type="text">
<span slot="suffix">m/s</span> <span slot="suffix">m/s</span>
</el-input> </el-input>
@ -478,7 +478,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="fromType==3|| fromType==4" :gutter="20"> <el-row v-if="fromType === 3 || fromType === 4" :gutter="20">
<el-col :span="9"> <el-col :span="9">
<el-form-item label="油缸数量" prop="youguanshuliang"> <el-form-item label="油缸数量" prop="youguanshuliang">
<el-input v-model="param.youguanshuliang" type="text" /> <el-input v-model="param.youguanshuliang" type="text" />
@ -546,6 +546,7 @@
</el-row> </el-row>
</fieldset> </fieldset>
<fieldset> <fieldset>
<legend>检验信息</legend>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="20"> <el-col :span="20">
<el-form-item label="检验依据" prop="jianyanyiju"> <el-form-item label="检验依据" prop="jianyanyiju">
@ -553,15 +554,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</fieldset>
<fieldset>
<legend>主要检验仪器和设备</legend>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="20"> <el-col :span="20">
<el-input <el-form-item label="主要检验仪器和设备" prop="gongjuxianghao">
v-model="param.gongjuxianghao" <el-input v-model="param.gongjuxianghao" style="width: 100px" />号检验专用工具箱
style="width: 450px" </el-form-item>
/>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
@ -585,18 +582,24 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="18"> <el-col :span="18" style="height: auto;">
<el-form-item label="备注" prop="beizhu"> <el-form-item label="备注" prop="beizhu">
<el-input <el-input
v-model="ysjl.beizhu" v-model="ysjl.beizhu"
type="textarea" type="textarea"
:autosize="{ minRows: 2, maxRows: 5 }"
:disabled="edit" :disabled="edit"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20" style="margin: 20px 0"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="9">
<el-form-item label="检验日期" prop="jianyanjieshuriqi">
<el-input v-model="ysjl.jianyanjieshuriqi" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="现场检验日期" prop="xianchangjianyanriqi"> <el-form-item label="现场检验日期" prop="xianchangjianyanriqi">
<el-date-picker <el-date-picker
v-model="ysjl.xianchangjianyanriqi" v-model="ysjl.xianchangjianyanriqi"
@ -606,7 +609,9 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-if="fromType!=='5'" :span="8"> </el-row>
<el-row :gutter="20">
<el-col v-if="fromType !== 5" :span="9">
<el-form-item label="检验完成日期" prop="jianyanjieshuriqi"> <el-form-item label="检验完成日期" prop="jianyanjieshuriqi">
<el-date-picker <el-date-picker
v-model="ysjl.jianyanjieshuriqi" v-model="ysjl.jianyanjieshuriqi"
@ -616,7 +621,7 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="9">
<el-form-item label="下次检验日期" prop="xiacijianyanriqi"> <el-form-item label="下次检验日期" prop="xiacijianyanriqi">
<el-date-picker <el-date-picker
v-model="ysjl.xiacijianyanriqi" v-model="ysjl.xiacijianyanriqi"
@ -629,12 +634,12 @@
</el-row> </el-row>
<template> <template>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="8"> <el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan"> <el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="ysjl.jianyanrenyuan" /> <el-input v-model="ysjl.jianyanrenyuan" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="9">
<sign-name <sign-name
:jianyanrenyuan="jianyanrenyuan" :jianyanrenyuan="jianyanrenyuan"
:ysjl="ysjl" :ysjl="ysjl"
@ -642,11 +647,6 @@
@setSignValue="signNameValue" @setSignValue="signNameValue"
/> />
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="日期" prop="jianyanjieshuriqi">
<el-input v-model="ysjl.jianyanjieshuriqi" />
</el-form-item>
</el-col>
</el-row> </el-row>
</template> </template>
</fieldset> </fieldset>
@ -655,102 +655,21 @@
<el-tab-pane label="检验项目" name="second"> <el-tab-pane label="检验项目" name="second">
<Inspection :bgfy-data="bgfyData" /> <Inspection :bgfy-data="bgfyData" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane v-if="fromType == '5'" label="附表1" name="three"> <el-tab-pane v-if="fromType === 5" label="附表1" name="three">
<Table2 ref="table2" /> <zdft-fb ref="table1" :table-data.sync="fubiao1" />
</el-tab-pane>
<el-tab-pane
v-for="(item, index) in arrayGroup"
v-else
:key="index"
:label="'附表' + (index + 1)"
:name="'tab' + index"
>
<Table
ref="table3"
:tabel-header="item.header"
:table-data="item.data"
:from-type="fromType"
@addfn="addfn(item)"
/>
</el-tab-pane> </el-tab-pane>
<!-- <el-tab-pane v-if="fromType==1" label="附表二" name="four"> <template v-else>
<Table ref="table2" :tabel-header="tableHeader1" :table-data="list1"/> <el-tab-pane label="附表一" name="four">
</el-tab-pane> --> <Table ref="table1" :tabel-header="arrayGroup[0].header" :table-data.sync="fubiao1" />
<el-tab-pane v-if="fromType == 1||fromType==3" label="附表3" name="five"> </el-tab-pane>
<Table1 ref="table1" :pic="pic" /> <el-tab-pane label="附表二" name="five">
</el-tab-pane> <Table ref="table2" :tabel-header="arrayGroup[1].header" :table-data.sync="fubiao2" />
</el-tabs> </el-tab-pane>
<el-dialog <el-tab-pane v-if="fromType === 1 || fromType === 3" label="附表3" name="six">
:visible.sync="jyxmrqShow" <phxsb ref="table3" :table-data.sync="fubiao3" :pic="pic" />
title="批量修改日期" </el-tab-pane>
width="500px"
@close="jyxmrqShow = false"
>
<template>
<el-date-picker
v-model="querenriqi"
type="date"
format="yyyy.MM.dd"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
placeholder="选择日期"
style="width: 100%"
/>
</template> </template>
<span slot="footer" class="dialog-footer"> </el-tabs>
<el-button @click="jyxmrqShow = false"> </el-button>
<el-button type="primary" @click="batchUpd"> </el-button>
</span>
</el-dialog>
<el-dialog
title="查看相关鉴证"
:modal-append-to-body="false"
:visible.sync="dialogEnclosureVisible"
>
<enclosure
:relation-id="ysjl.renwuId"
:if-liaison="false"
:view-button="true"
:is-show-hetong="isSysUser"
/>
</el-dialog>
<el-dialog title="编辑权限" :visible.sync="dialogRoleVisible">
<template>
<div class="tag-group">
<span class="tag-group__title">已有权限人员</span>
<el-tag v-for="item in defaultRlr" :key="item" effect="dark">
{{ common.convertCnName(item) }}
</el-tag>
</div>
<br>
<el-select
v-model="renlingren"
multiple
collapse-tags
placeholder="请选择要追加的监检员"
>
<el-option
v-for="item in userList"
:key="item.id"
:label="item.nickname"
:value="item.id"
/>
</el-select>
</template>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogRoleVisible = false"> </el-button>
<el-button type="primary" @click="updateRenlingren"> </el-button>
</span>
</el-dialog>
<sign-name
v-show="signShow"
ref="qmButton"
:ysjl="ysjl"
:jianyanrenyuan="xmjianyanrenyuan"
field-name="xmqianming"
:custom-clear-sign="customClearSign"
@setSignValue="signNameValue"
/>
</div> </div>
</template> </template>
<script> <script>
@ -758,22 +677,18 @@ import Sticky from '@/components/Sticky'
import SignName from '@/views/common/SignName' import SignName from '@/views/common/SignName'
import Utils from '@/utils/contact' import Utils from '@/utils/contact'
import merge from 'webpack-merge' import merge from 'webpack-merge'
import Enclosure from '@/views/common/Enclosure'
import Inspection from '@/views/ysjl/3000/common/inspection-items' import Inspection from '@/views/ysjl/3000/common/inspection-items'
import Table from '@/views/ysjl/3000/dj/common/table' import Table from '@/views/ysjl/3000/dj/common/table'
import Table1 from '@/views/ysjl/3000/dj/common/table1' import Phxsb from '@/views/ysjl/3000/dj/common/phxsb'
import Table2 from '@/views/ysjl/3000/dj/common/table2' import ZdftFb from '@/views/ysjl/3000/dj/common/zdftFb'
export default { export default {
name: 'BaseInfo', name: 'BaseInfo',
components: { SignName, Sticky, Enclosure, Inspection, Table, Table1, Table2 }, components: { SignName, Sticky, Inspection, Table, Phxsb, ZdftFb },
props: { props: {
arrayGroup: { arrayGroup: {
require: true, required: true,
type: Array, type: Array
default: () => {
return []
}
}, },
// /** // /**
// * [{ index: 0, relationIds: [1, 2] }] // * [{ index: 0, relationIds: [1, 2] }]
@ -784,14 +699,17 @@ export default {
// }, // },
fromType: { fromType: {
required: true, required: true,
type: String type: Number
},
jlbh1: {
type: String,
default: 'DT'
} }
}, },
data() { data() {
return { return {
ysjl: {}, ysjl: {},
param: {}, param: {},
jlbh1: 'GJ',
jlbh2: '(' + new Date().getFullYear() + ')', jlbh2: '(' + new Date().getFullYear() + ')',
jlbh3: '', jlbh3: '',
isRepeat: false, isRepeat: false,
@ -808,9 +726,6 @@ export default {
jyxmrqShow: false, jyxmrqShow: false,
querenriqi: null, querenriqi: null,
signShow: false, signShow: false,
xmjianyanrenyuan: '',
xggcList: [],
biliOptions: ['0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1'],
dialogEnclosureVisible: false, dialogEnclosureVisible: false,
dialogRoleVisible: false, dialogRoleVisible: false,
userList: [], userList: [],
@ -847,38 +762,28 @@ export default {
return time.getTime() > Date.now() return time.getTime() > Date.now()
} }
}, },
pic: '' pic: '',
fubiao1: [],
fubiao2: [],
fubiao3: []
} }
}, },
created() { created() {
if (this.state === 'create') { if (this.state === 'create') {
this.initYsjl() this.initYsjl()
this.getMaxBh()
} else { } else {
this.getYsjl() this.getYsjl()
this.getParam() this.getParam()
this.getJyxm(1) this.getJyxm(1)
this.getFbList() this.getJyxmInfoByYsjl()
} }
this.getDicJyxm(1) this.getDicJyxm(1)
this.getDicData()
this.userList = this.$store.getters.allUser.filter( this.userList = this.$store.getters.allUser.filter(
(user) => user.departmentId === 74 && user.clientType === 'System' (user) => user.departmentId === 74 && user.clientType === 'System'
) )
}, },
methods: { methods: {
addfn(item) {
const length = item.data.length
item.data.push({
id: parseInt(length),
D1: '',
D2: '',
D3: '',
D4: '',
D5: '',
D6: '',
D7: ''
})
},
initYsjl() { initYsjl() {
this.ysjlController.init(this.$route.query).then((data) => { this.ysjlController.init(this.$route.query).then((data) => {
this.ysjl = data.ysjl this.ysjl = data.ysjl
@ -886,9 +791,8 @@ export default {
this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd') this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd')
this.ysjl.bglx = 1 this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl' this.ysjl.cjState = 'ysjl'
this.ysjl.xianchangjianyantiaojian = '符合'
this.getJyxm(1) this.getJyxm(1)
// this.getFbList(); //
// this.getZzdw()
this.getSbList() this.getSbList()
}) })
}, },
@ -905,10 +809,27 @@ export default {
this.xinghaoList = data this.xinghaoList = data
}) })
}, },
getFbList() { getJyxmInfoByYsjl() {
this.ysjlController.getYsjlFb(this.ysjlId).then((data) => { this.ysjlController.getJyxmInfoByYsjl(this.ysjlId).then((data) => {
console.log(data) if (!data.fbjyxm) {
// this.param = data return
}
const fubiao = JSON.parse(data.fbjyxm)
if (!fubiao.length) {
return
}
if (fubiao[0]) {
this.fubiao1 = fubiao[0]
}
if (fubiao[1]) {
this.fubiao2 = fubiao[1]
}
if (fubiao[2]) {
this.fubiao3 = fubiao[2]
}
console.log(this.fubiao1)
console.log(this.fubiao2)
console.log(this.fubiao3)
}) })
}, },
getYsjl() { getYsjl() {
@ -958,12 +879,12 @@ export default {
if (this.$route.query.state === 'update') { if (this.$route.query.state === 'update') {
this.jyxmController.getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort).then((data) => { this.jyxmController.getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort).then((data) => {
this.bgfyData = data this.bgfyData = data
this.tableJs.mergeColRows(this.cols, this.rows, data) this.tableJs.getData(this.cols, this.rows, this.bgfyData)
}) })
} else { } else {
this.jyxmController.getCyJyxm(this.$route.query.templateId, sort).then((data) => { this.jyxmController.getCyJyxm(this.$route.query.templateId, sort).then((data) => {
this.bgfyData = data this.bgfyData = data
this.tableJs.mergeColRows(this.cols, this.rows, data) this.tableJs.getData(this.cols, this.rows, this.bgfyData)
}) })
} }
}, },
@ -976,33 +897,9 @@ export default {
}) })
}) })
}, },
getZzdw() { /**
this.api({ * 查询最大记录编号
url: '/dwxx/getById', */
method: 'get',
params: {
id: this.ysjl.zzdwId
}
}).then((data) => {
this.jlbh1 += data.zhizaodanweiCode
this.ysjl.zhizaoxukezhengjibie = data.zhizaoxukezhengjibie
this.ysjl.zhizaoxukezhengbianhao = data.zhizaoxukezhengbianhao
this.getMaxBh()
})
},
getDicData() {
this.api({
url: '/dicData/getDicDataByTypeCode',
method: 'get',
params: {
typeCode: 'GL_ZZ_XGGC'
}
}).then((data) => {
this.xggcList = data
})
},
//
getMaxBh() { getMaxBh() {
const aheadPart = this.jlbh1 + this.jlbh2 + '-' const aheadPart = this.jlbh1 + this.jlbh2 + '-'
this.api({ this.api({
@ -1026,63 +923,13 @@ export default {
* @param data * @param data
*/ */
signNameValue(data) { signNameValue(data) {
if (data.fieldName === 'xmqianming') { this.ysjl.jianyanrenyuan = String(data.id)
for (let i = 0; i < this.$refs.bgfyData.selection.length; i++) { this.jianyanrenyuan = data.name
const jianyanrenyuan = this.$refs.bgfyData.selection[i].jianjianyuan this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
? this.$refs.bgfyData.selection[i].jianjianyuan.split(',')
: []
if (!jianyanrenyuan.includes(data.name)) {
jianyanrenyuan.push(data.name)
this.$refs.bgfyData.selection[i].jianjianyuan =
jianyanrenyuan.join(',')
}
}
} else {
const isNotHasJyry = !this.ysjl.jianyanrenyuan
this.ysjl.jianyanrenyuan = String(data.id)
this.jianyanrenyuan = data.name
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
Utils.$emit('manufacture-list')
//
if (
isNotHasJyry &&
this.jianyanrenyuan &&
this.jianyanrenyuan.split(',').length === 1
) {
this.bgfyData.forEach((jyxm) => {
//
if (
!jyxm.jianjianyuan ||
!jyxm.jianjianyuan
.split(',')
.filter((jjr) => jjr === this.jianyanrenyuan).length
) {
if (jyxm.jianjianyuan) {
const jianjianyuan = jyxm.jianjianyuan.split(',')
jianjianyuan.push(this.jianyanrenyuan)
jyxm.jianjianyuan = jianjianyuan.join(',')
} else {
jyxm.jianjianyuan = this.jianyanrenyuan
}
}
})
}
}
}, },
customClearSign(fieldName) { customClearSign(fieldName) {
if (fieldName === 'xmqianming') { const data = {
for (let i = 0; i < this.$refs.bgfyData.selection.length; i++) { id:
let jyry = this.$refs.bgfyData.selection[i].jianjianyuan || ''
jyry = this.common
.deleteElement(
jyry.split(','),
String(this.$store.getters.nickname)
)
.join(',')
}
} else {
const data = {
id:
this.ysjl.jianyanrenyuan && this.ysjl.jianyanrenyuan &&
this.common this.common
.deleteElement( .deleteElement(
@ -1090,7 +937,7 @@ export default {
String(this.$store.getters.userId) String(this.$store.getters.userId)
) )
.join(','), .join(','),
name: name:
this.jianyanrenyuan && this.jianyanrenyuan &&
this.common this.common
.deleteElement( .deleteElement(
@ -1098,28 +945,17 @@ export default {
this.$store.getters.nickname this.$store.getters.nickname
) )
.join(','), .join(','),
fieldName: fieldName fieldName: fieldName
}
this.signNameValue(data)
} }
this.signNameValue(data)
}, },
saveYsjl(operation) { saveYsjl(operation) {
const tableData = [] const tableData = []
const arr = [] let fubiao
if (this.fromType === '5') { if (this.fromType === 5) {
arr.push(this.$refs.table2.tableData) fubiao = [this.$refs.table1.tableData]
} else { } else {
this.arrayGroup.map((item) => { fubiao = [this.fubiao1, this.fubiao2, this.fubiao3]
item.data.forEach(k => {
delete k.id
})
arr.push(item.data)
})
const arr1 = JSON.parse(JSON.stringify(this.$refs.table1.tableData))
arr1.map(item => {
delete item.name
})
arr.push(arr1)
} }
this.bgfyData.forEach((row) => { this.bgfyData.forEach((row) => {
tableData.push({ tableData.push({
@ -1132,12 +968,11 @@ export default {
sort: row.sort, sort: row.sort,
orders: row.orders, orders: row.orders,
cjState: 0 cjState: 0
}) })
}) })
if (operation === 'add') { if (operation === 'add') {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + '-' + this.jlbh3 this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + '-' + this.jlbh3
this.save(operation, 'post', tableData, arr) this.save(operation, 'post', tableData, fubiao)
} else if (operation === 'build') { } else if (operation === 'build') {
this.ysjl.baogaobianhao = this.ysjl.jilubianhao this.ysjl.baogaobianhao = this.ysjl.jilubianhao
if ( if (
@ -1168,14 +1003,14 @@ export default {
return false return false
} }
} }
this.save(operation, 'put', tableData, arr) this.save(operation, 'put', tableData, fubiao)
} else if (operation === 'upd') { } else if (operation === 'upd') {
this.save(operation, 'put', tableData, arr) this.save(operation, 'put', tableData, fubiao)
} }
}, },
save(operation, type, jyxm, fb) { save(operation, type, jyxm, fubiao) {
if (this.fromType !== '5') this.ysjl.imagePath = this.$refs.table1.imgPath if (this.fromType !== 5) this.ysjl.imagePath = this.$refs.table1.imgPath
// //
if (this.isRepeat) { if (this.isRepeat) {
@ -1194,7 +1029,8 @@ export default {
ysjl: this.ysjl, ysjl: this.ysjl,
param: this.param, param: this.param,
cyJyxm: { cyJyxm: {
fbjyxm: JSON.stringify(fb) ysjlId: this.ysjl.id,
fbjyxm: JSON.stringify(fubiao)
}, },
jdJyxm: jyxm, jdJyxm: jyxm,
flag: operation flag: operation
@ -1349,13 +1185,4 @@ export default {
} }
</style> </style>
<style lang="scss" scoped> <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> </style>

129
src/views/ysjl/3000/dj/common/table1.vue → src/views/ysjl/3000/dj/common/phxsb.vue

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-table :data="tableData" style="width: 100%" border> <el-table :data.sync="tableData" style="width: 100%" border>
<el-table-column label="电动机电流载重量百分比" prop="name" /> <el-table-column label="电动机电流载重量百分比" prop="name" />
<el-table-column label="30%" prop="D5"> <el-table-column label="30%" prop="D5">
<template slot-scope="scope"> <template slot-scope="scope">
@ -34,27 +34,21 @@
<script> <script>
import * as echarts from 'echarts' import * as echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme require('echarts/theme/macarons') // echarts theme
import resize from '@/utils/mixins/resize'
export default { export default {
name: 'Table', name: 'Phxsb',
components: {}, mixins: [resize],
props: { props: {
tabelHeader: { /**
type: Array, * [ { name: '上行(A)', D1: '', D2: '', D3: '', D4: '', D5: '' }, { name: '下行(A)', D1: '', D2: '', D3: '', D4: '', D5: '' } ]
require: true, */
default: () => {
return []
}
},
tableData: { tableData: {
type: Array, type: Array,
require: true, required: true
default: () => {
return []
}
}, },
pic: { pic: {
type: String, type: String,
require: true,
default: '' default: ''
} }
}, },
@ -76,49 +70,95 @@ export default {
} }
], ],
multipleSelection: [], multipleSelection: [],
data: [], chart: undefined,
data1: [], phxsX: [],
imgPath: '' phxsY: [],
imgPath: '',
xAxis: ['30', '40', '45', '50', '60'],
chartDataX: [],
chartDataY: []
} }
}, },
computed: {},
watch: { watch: {
tableData: { tableData: {
handler: function(val) { handler: function(val) {
this.data = Object.values(val[0]).slice(1) this.initTableData()
this.data1 = Object.values(val[1]).slice(1) this.phxsX = []
this.phxsY = []
this.chartDataX = []
this.chartDataY = []
for (let i = 5; i > 0; i--) {
const key = 'D' + i
const xValue = Number(val[0][key])
const yValue = Number(val[1][key])
this.chartDataX.push(xValue)
this.chartDataY.push(yValue)
this.phxsX.push([this.xAxis[5 - i], xValue])
this.phxsY.push([this.xAxis[5 - i], yValue])
}
this.buildPhxs()
this.initChart() this.initChart()
}, },
deep: true deep: true
} }
}, },
created() { created() {
this.tableData = [ this.initTableData()
{ },
mounted() {
this.initChart()
},
methods: {
initTableData() {
if (this.tableData.length) {
return
}
this.tableData.push({
name: '上行(A)', name: '上行(A)',
D1: '', D1: '',
D2: '', D2: '',
D3: '', D3: '',
D4: '', D4: '',
D5: '' D5: ''
}, })
{ this.tableData.push({
name: '下行(A)', name: '下行(A)',
D1: '', D1: '',
D2: '', D2: '',
D3: '', D3: '',
D4: '', D4: '',
D5: '' D5: ''
})
},
buildPhxs() {
let phxs = 0
let phxsTemp = 0
for (let i = 0; i < this.phxsX.length - 1; i++) {
phxsTemp = parseInt(this.crossPointX(parseFloat(this.phxsX[i][0]), parseFloat(this.phxsX[i][1]), parseFloat(this.phxsX[i + 1][0]),
parseFloat(this.phxsX[i + 1][1]), parseFloat(this.phxsY[i][0]), parseFloat(this.phxsY[i][1]), parseFloat(this.phxsY[i + 1][0]),
parseFloat(this.phxsY[i + 1][1])))
if (phxsTemp > parseFloat(this.phxsX[i][0]) && phxsTemp < parseFloat(this.phxsX[i + 1][0])) {
phxs = phxsTemp
}
} }
] console.log('平衡系数', phxs)
}, this.$emit('loadPhxs', phxs)
mounted() { },
this.initChart() crossPointX(line1x1, line1y1, line1x2, line1y2, line2x1, line2y1, line2x2, line2y2) {
}, return (line1x1 * (line1y2 - line1y1) / (line1x2 - line1x1) - line2x1 * (line2y2 - line2y1) / (line2x2 - line2x1) + line2y1 - line1y1) /
methods: { ((line1y2 - line1y1) / (line1x2 - line1x1) - (line2y2 - line2y1) / (line2x2 - line2x1))
},
initChart() { initChart() {
const myChart = echarts.init(document.getElementById('chart')) let option
const option = { if (this.chart) {
option = this.chart.getOption()
option.series[0].data = this.chartDataX
option.series[1].data = this.chartDataY
this.chart.setOption(option)
return
}
this.chart = echarts.init(document.getElementById('chart'))
option = {
title: { title: {
text: '电流(A)' text: '电流(A)'
}, },
@ -142,42 +182,37 @@ export default {
xAxis: { xAxis: {
type: 'category', type: 'category',
boundaryGap: false, boundaryGap: false,
data: ['0', '10', '20', '30', '40', '45', '50', '60'] data: this.xAxis
}, },
yAxis: { yAxis: {
type: 'value' type: 'value',
min: 0,
max: 30,
splitNumber: 15
}, },
series: [ series: [
{ {
name: '上行', name: '上行',
type: 'line', type: 'line',
stack: '总量', data: this.chartDataX
data: this.data
}, },
{ {
name: '下行', name: '下行',
type: 'line', type: 'line',
stack: '总量', data: this.chartDataY
data: this.data1
} }
] ]
} }
myChart.setOption(option) this.chart.setOption(option)
this.imgPath = myChart.getDataURL({ this.imgPath = this.chart.getDataURL({
type: 'png', type: 'png',
pixelRatio: 1, pixelRatio: 1,
backgroundColor: '#fff' backgroundColor: '#fff'
}) })
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.searchBox {
display: flex;
flex-direction: row;
margin-bottom: 20px;
}
</style> </style>

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

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="searchBox"> <div class="searchBox">
<el-button type="primary" @click="addtable"> <el-button type="primary" @click="tableJs.addRow($refs.fubiao)">
新增 新增
</el-button> </el-button>
<el-button type="danger" @click="deleteFn"> <el-button type="danger" @click="deleteFn">
@ -10,7 +10,9 @@
</div> </div>
<el-table <el-table
:data="tableData" ref="fubiao"
:data.sync="tableData"
border
style="width: 100%" style="width: 100%"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
@ -24,7 +26,7 @@
:prop="item.prop" :prop="item.prop"
:label="item.label" :label="item.label"
> >
<template v-if="item.type==1" slot-scope="scope"> <template v-if="item.type === 1" slot-scope="scope">
<el-autocomplete <el-autocomplete
v-model="scope.row[scope.column.property]" v-model="scope.row[scope.column.property]"
class="inline-input" class="inline-input"
@ -55,21 +57,15 @@ export default {
props: { props: {
tabelHeader: { tabelHeader: {
type: Array, type: Array,
require: true, required: true
default: () => {
return []
}
}, },
fromType: { fromType: {
type: String, type: Number,
default: '' default: 0
}, },
tableData: { tableData: {
type: Array, type: Array,
require: true, required: true
default: () => {
return []
}
} }
}, },
data() { data() {
@ -114,7 +110,7 @@ export default {
console.log(item) console.log(item)
}, },
addtable() { addtable() {
this.$emit('addfn') this.tableData.push({})
}, },
deleteFn() { deleteFn() {
if (this.multipleSelection.length === 0) { if (this.multipleSelection.length === 0) {

43
src/views/ysjl/3000/dj/common/table2.vue → src/views/ysjl/3000/dj/common/zdftFb.vue

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-table :data="tableData" style="width: 50%" border> <el-table :data="tableData" style="width: 50%">
<el-table-column label="" prop="D2" /> <el-table-column label="" prop="D2" />
<el-table-column label="制停距离(m)" prop="D1"> <el-table-column label="制停距离(m)" prop="D1">
<template slot-scope="scope"> <template slot-scope="scope">
@ -12,22 +12,12 @@
</template> </template>
<script> <script>
export default { export default {
name: 'Table2', name: 'ZdftFb',
components: {}, components: {},
props: { props: {
tabelHeader: {
type: Array,
require: true,
default: () => {
return []
}
},
tableData: { tableData: {
type: Array, type: Array,
require: true, required: true
default: () => {
return []
}
} }
}, },
data() { data() {
@ -47,36 +37,9 @@ export default {
} }
] ]
} }
},
computed: {},
created() {
this.tableData = [
{
D1: '',
D2: '第一行'
},
{
D1: '',
D2: '第二行'
},
{
D1: '',
D2: '第三行'
}
]
},
mounted() {
},
methods: {
} }
} }
</script> </script>
<style scoped> <style scoped>
.searchBox {
display: flex;
flex-direction: row;
margin-bottom: 20px;
}
</style> </style>

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

@ -11,7 +11,7 @@ export default {
components: { baseInfo }, components: { baseInfo },
data() { data() {
return { return {
type: '1', type: 1,
arrayGroup: [ arrayGroup: [
{ {
header: [ header: [

2
src/views/ysjl/3000/dj/yy/index.vue

@ -11,7 +11,7 @@ export default {
components: { baseInfo }, components: { baseInfo },
data() { data() {
return { return {
type: '3', type: 3,
arrayGroup: [ arrayGroup: [
{ {
header: [ header: [

2
src/views/ysjl/3000/dj/zdft/index.vue

@ -11,7 +11,7 @@ export default {
components: { baseInfo }, components: { baseInfo },
data() { data() {
return { return {
type: '5', type: 5,
arrayGroup: [ arrayGroup: [
{ {
header: [ header: [

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

@ -11,7 +11,7 @@ export default {
components: { baseInfo }, components: { baseInfo },
data() { data() {
return { return {
type: '2', type: 2,
arrayGroup: [ arrayGroup: [
{ {
header: [ header: [

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

@ -11,7 +11,7 @@ export default {
components: { baseInfo }, components: { baseInfo },
data() { data() {
return { return {
type: '2' type: 2
} }
}, },
computed: { computed: {

2
src/views/ysjl/3000/jj/yy-jj/index.vue

@ -11,7 +11,7 @@ export default {
components: { baseInfo }, components: { baseInfo },
data() { data() {
return { return {
type: '4', type: 4,
arrayGroup: [ arrayGroup: [
{ {
header: [ header: [

Loading…
Cancel
Save