Browse Source

优化页面

master
李磊 3 years ago
parent
commit
30a9aaf76d
  1. 38
      src/views/borrow/borrow.vue
  2. 22
      src/views/device_management/index.vue
  3. 202
      src/views/ysjl/2000/2100/fenxiang/bhcd.vue
  4. 56
      src/views/ysjl/3000/common/index.vue

38
src/views/borrow/borrow.vue

@ -3,40 +3,10 @@
<!--头部选项--> <!--头部选项-->
<div class="head-container"> <div class="head-container">
<div> <div>
<el-date-picker <el-input v-model="query.baogaobianhao" type="date" placeholder="报告编号" @change="crud.toQuery" />
v-model="query.jieyueTime" <el-input v-model="query.baogaobianhao" type="date" placeholder="报告编号" @change="crud.toQuery" />
type="date" <el-input v-model="query.baogaobianhao" type="date" placeholder="报告编号" @change="crud.toQuery" />
placeholder="选择借阅日期" <el-input v-model="query.baogaobianhao" type="date" placeholder="报告编号" @change="crud.toQuery" />
@change="crud.toQuery"
/>
<el-select
v-model="query.state"
placeholder="请选择借阅状态"
style="width: 150px"
class="filter-item"
clearable
>
<el-option
v-for="item in ifOverdueList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-select
v-model="query.jieyueren"
placeholder="请选择借阅人"
style="width: 150px"
class="filter-item"
clearable
>
<el-option
v-for="item in useStateList"
:key="item.value"
:label="item.label"
:value="item.id"
/>
</el-select>
<el-button type="primary" icon="el-icon-search" @click="crud.toQuery"> <el-button type="primary" icon="el-icon-search" @click="crud.toQuery">
查询 查询
</el-button> </el-button>

22
src/views/device_management/index.vue

@ -31,24 +31,24 @@
<query :crud="crud" /> <query :crud="crud" />
</div> </div>
<crud :permission="permission"> <crud :permission="permission">
<el-upload <el-button slot="right" class="filter-item" type="primary" icon="el-icon-edit-outline" :disabled="crud.selections.length !== 1" @click="moveAdministration(crud.selections)">
slot="right" 领用借用管理
class="filter-item" </el-button>
:show-file-list="false" <!-- <el-upload
:before-upload="beforeUpload" slot="right"
accept="application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" class="filter-item"
action="" :show-file-list="false"
:before-upload="beforeUpload"
accept="application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
action=""
> >
<el-button type="primary" icon="el-icon-upload"> <el-button type="primary" icon="el-icon-upload">
上传数据 上传数据
</el-button> </el-button>
</el-upload> </el-upload>
<el-button slot="right" class="filter-item" type="primary" icon="el-icon-edit-outline" :disabled="crud.selections.length !== 1" @click="moveAdministration(crud.selections)">
领用借用管理
</el-button>
<el-button slot="right" class="filter-item" icon="el-icon-download" type="warning" @click="exportExcel"> <el-button slot="right" class="filter-item" icon="el-icon-download" type="warning" @click="exportExcel">
导出数据 导出数据
</el-button> </el-button>-->
</crud> </crud>
</div> </div>
<!--表格内容--> <!--表格内容-->

202
src/views/ysjl/2000/2100/fenxiang/bhcd.vue

@ -65,14 +65,18 @@
<el-col :span="9"> <el-col :span="9">
<el-form-item label="厚度-筒体" prop="tongtimingyihoudu"> <el-form-item label="厚度-筒体" prop="tongtimingyihoudu">
<el-input v-model="param.tongtimingyihoudu" :disabled="edit"> <el-input v-model="param.tongtimingyihoudu" :disabled="edit">
<template slot="append"> mm </template> <template slot="append">
mm
</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item label="实测最小值-筒体" prop="tongtizuixiaobihou"> <el-form-item label="实测最小值-筒体" prop="tongtizuixiaobihou">
<el-input v-model="param.tongtizuixiaobihou" :disabled="edit"> <el-input v-model="param.tongtizuixiaobihou" :disabled="edit">
<template slot="append"> mm </template> <template slot="append">
mm
</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -81,14 +85,18 @@
<el-col :span="9"> <el-col :span="9">
<el-form-item label="厚度-封头" prop="fengtoumingyihoudu"> <el-form-item label="厚度-封头" prop="fengtoumingyihoudu">
<el-input v-model="param.fengtoumingyihoudu" :disabled="edit"> <el-input v-model="param.fengtoumingyihoudu" :disabled="edit">
<template slot="append"> mm </template> <template slot="append">
mm
</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item label="实测最小值-封头" prop="fengtouzuixiaobihou"> <el-form-item label="实测最小值-封头" prop="fengtouzuixiaobihou">
<el-input v-model="param.fengtouzuixiaobihou" :disabled="edit"> <el-input v-model="param.fengtouzuixiaobihou" :disabled="edit">
<template slot="append"> mm </template> <template slot="append">
mm
</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -164,7 +172,9 @@
<el-col :span="9"> <el-col :span="9">
<el-form-item label="实测点数" prop="shicedianshu"> <el-form-item label="实测点数" prop="shicedianshu">
<el-input v-model="param.shicedianshu" :disabled="true"> <el-input v-model="param.shicedianshu" :disabled="true">
<template slot="append"> </template> <template slot="append">
</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -173,7 +183,9 @@
<el-col :span="9"> <el-col :span="9">
<el-form-item label="实测部位" prop="shicebuwei"> <el-form-item label="实测部位" prop="shicebuwei">
<el-input v-model="param.shicebuwei" :disabled="true"> <el-input v-model="param.shicebuwei" :disabled="true">
<template slot="append"> </template> <template slot="append">
</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -403,10 +415,10 @@
</div> </div>
</template> </template>
<script> <script>
import Sticky from "@/components/Sticky"; import Sticky from '@/components/Sticky'
import btn from "@/views/common/FxButton"; import btn from '@/views/common/FxButton'
export default { export default {
name: "RqZbgBhcd2100", name: 'RqZbgBhcd2100',
components: { Sticky, btn }, components: { Sticky, btn },
data() { data() {
return { return {
@ -414,89 +426,89 @@ export default {
param: {}, param: {},
tableData: [], tableData: [],
delRowIndex: [], delRowIndex: [],
state: "", state: '',
edit: false, edit: false,
info: { info: {
ysjlId: this.$route.query.id, ysjlId: this.$route.query.id,
jyxm: this.$route.query.jyxm, jyxm: this.$route.query.jyxm,
limit: 1, limit: 1
}, }
}; }
},
created() {
this.getInfo();
}, },
watch: { watch: {
tableData: { tableData: {
handler(n, o) { handler(n, o) {
let arr = []; const arr = []
if (n.length > 0) { if (n.length > 0) {
for (let i = 0; i < n.length; i++) { for (let i = 0; i < n.length; i++) {
for (let k in n[i]) { for (const k in n[i]) {
if (n[i][k] !== " ") { if (n[i][k] !== ' ') {
arr.push(n[i][k]); arr.push(n[i][k])
} }
} }
} }
} }
let arr2 = []; const arr2 = []
arr.map((item) => { arr.map((item) => {
if (item !== "") { if (item !== '') {
arr2.push(item); arr2.push(item)
} }
}); })
this.param.shicedianshu = arr2.length - n.length; this.param.shicedianshu = arr2.length - n.length
}, },
deep: true, deep: true,
immediate: true, immediate: true
}, }
},
created() {
this.getInfo()
}, },
methods: { methods: {
getInfo() { getInfo() {
this.api({ this.api({
url: "/fx", url: '/fx',
method: "get", method: 'get',
params: { params: {
ysjlId: this.$route.query.id, ysjlId: this.$route.query.id,
jyxm: this.$route.query.jyxm, jyxm: this.$route.query.jyxm
}, }
}).then((data) => { }).then((data) => {
this.ysjl = data.ysjl; this.ysjl = data.ysjl
this.state = "create"; this.state = 'create'
if (data.param !== null && data.param !== undefined) { if (data.param !== null && data.param !== undefined) {
// //
this.state = "update"; this.state = 'update'
this.param = data.param; this.param = data.param
this.param.celiangyiqibianhao = this.param.celiangyiqibianhao this.param.celiangyiqibianhao = this.param.celiangyiqibianhao
? this.param.celiangyiqibianhao ? this.param.celiangyiqibianhao
: "02-06-"; : '02-06-'
this.param.celiangyiqijingdu = this.param.celiangyiqijingdu this.param.celiangyiqijingdu = this.param.celiangyiqijingdu
? this.param.celiangyiqijingdu ? this.param.celiangyiqijingdu
: "±0.1mm"; : '±0.1mm'
this.tableData = this.tableData =
JSON.parse(data.param.fubiao) === null JSON.parse(data.param.fubiao) === null
? JSON.parse("[]") ? JSON.parse('[]')
: JSON.parse(data.param.fubiao); : JSON.parse(data.param.fubiao)
} else { } else {
this.param = { this.param = {
celiangyiqibianhao: "02-06-", celiangyiqibianhao: '02-06-',
celiangyiqijingdu: "0.1mm", celiangyiqijingdu: '0.1mm',
ouheji: "TM-100 型医用超声耦合剂", ouheji: 'TM-100 型医用超声耦合剂',
biaomianzhuangkuang: "金属光泽", biaomianzhuangkuang: '金属光泽',
jiancejieguo: "符合设计要求。", jiancejieguo: '符合设计要求。',
myhdqtone: "无此项", myhdqtone: '无此项',
myhdqtzone: "无此项", myhdqtzone: '无此项',
zxbhqtone: "无此项", zxbhqtone: '无此项',
zxbhqtzone: "无此项", zxbhqtzone: '无此项',
myhdqttwo: "无此项", myhdqttwo: '无此项',
myhdqtztwo: "无此项", myhdqtztwo: '无此项',
zxbhqttwo: "无此项", zxbhqttwo: '无此项',
zxbhqtztwo: "无此项", zxbhqtztwo: '无此项'
}; }
} }
if (this.ysjl.flowstatus === 4) { if (this.ysjl.flowstatus === 4) {
this.state = "finish"; this.state = 'finish'
this.edit = true; this.edit = true
} }
this.$refs.btn.getParentInfo( this.$refs.btn.getParentInfo(
this.ysjl, this.ysjl,
@ -507,79 +519,79 @@ export default {
this.$route.query.jyxm, this.$route.query.jyxm,
true, true,
false false
); )
}); })
}, },
addChRow: function () { addChRow: function() {
const d = { const d = {
C1: "", C1: '',
C2: "", C2: '',
C3: "", C3: '',
C4: "", C4: '',
C5: "", C5: '',
C6: "", C6: '',
C7: "", C7: '',
C8: "", C8: '',
C9: "", C9: '',
C10: "", C10: '',
C11: "", C11: '',
C12: "", C12: ''
}; }
this.tableData.push(d); this.tableData.push(d)
setTimeout(() => { setTimeout(() => {
this.$refs.tableData.setCurrentRow(d); this.$refs.tableData.setCurrentRow(d)
}, 10); // }, 10) //
}, },
delChRow: function () { delChRow: function() {
if (this.delRowIndex.length === 0) { if (this.delRowIndex.length === 0) {
this.$message({ this.$message({
type: "error", type: 'error',
message: "请选中需要删除的数据!", message: '请选中需要删除的数据!'
}); })
return false; return false
} else { } else {
// delRowIndexindex // delRowIndexindex
this.delRowIndex.sort(function (x, y) { this.delRowIndex.sort(function(x, y) {
if (x < y) { if (x < y) {
return 1; return 1
} }
if (x > y) { if (x > y) {
return -1; return -1
} }
return 0; return 0
}); })
for (let i = 0; i < this.delRowIndex.length; i++) { for (let i = 0; i < this.delRowIndex.length; i++) {
this.tableData.splice(this.delRowIndex[i], 1); this.tableData.splice(this.delRowIndex[i], 1)
} }
this.$refs.tableData.clearSelection(); this.$refs.tableData.clearSelection()
this.delRowIndex = []; this.delRowIndex = []
} }
}, },
// //
onRowClick(row) { onRowClick(row) {
this.$refs.tableData.toggleRowSelection(row); this.$refs.tableData.toggleRowSelection(row)
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
row.index = rowIndex; row.index = rowIndex
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.delRowIndex = []; this.delRowIndex = []
for (let i = 0; i < val.length; i++) { for (let i = 0; i < val.length; i++) {
this.delRowIndex.push(val[i].index); this.delRowIndex.push(val[i].index)
} }
}, },
// //
uploadTableData(file) { uploadTableData(file) {
this.common.uploadTableData(file, this.tableData); this.common.uploadTableData(file, this.tableData)
}, },
/** /**
* 数据构建 * 数据构建
*/ */
beforeSaveBuildData() { beforeSaveBuildData() {
// TODO // TODO
}, }
}, }
}; }
</script> </script>
<style> <style>
#myTable .el-input__inner { #myTable .el-input__inner {

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

@ -507,13 +507,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="设备名称" prop="shebeimingcheng">
<el-input v-model="ysjl.shebeimingcheng" type="text" />
</el-form-item>
</el-col>
</el-row>
</fieldset> </fieldset>
<fieldset v-if="fromType !== 5 && fromType !== 6"> <fieldset v-if="fromType !== 5 && fromType !== 6">
<legend>设备技术参数</legend> <legend>设备技术参数</legend>
@ -937,6 +930,21 @@ export default {
handleChange(v) { handleChange(v) {
this.ysjl.departmentId = v[1] this.ysjl.departmentId = v[1]
}, },
buildJlbh2() {
if (this.ysjl.shebeileibiedaima === '3300') {
this.jlbh2 = '(F)'
} else if (this.ysjl.shebeileibiedaima === '3200') {
this.jlbh2 = '(Y)'
} else if (this.ysjl.shebeileibiedaima === '3400') {
if (this.ysjl.shebeipinzhongdaima === '3420') {
this.jlbh2 = '(X)'
} else if (this.ysjl.shebeipinzhongdaima === '3430') {
this.jlbh2 = '(Z)'
}
} else {
this.jlbh2 = '(C)'
}
},
initYsjl() { initYsjl() {
this.ysjlService.init(this.$route.query).then((data) => { this.ysjlService.init(this.$route.query).then((data) => {
this.ysjl = data.ysjl this.ysjl = data.ysjl
@ -946,19 +954,7 @@ export default {
this.ysjl.cjState = 'ysjl' this.ysjl.cjState = 'ysjl'
this.ysjl.xianchangjianyantiaojian = '符合' this.ysjl.xianchangjianyantiaojian = '符合'
this.departmentId = this.ysjl.departmentId this.departmentId = this.ysjl.departmentId
if (data.ysjl.shebeileibiedaima === '3300') { this.buildJlbh2()
this.jlbh2 = '(F)'
} else if (data.ysjl.shebeileibiedaima === '3200') {
this.jlbh2 = '(Y)'
} else if (data.ysjl.shebeileibiedaima === '3400') {
if (data.ysjl.shebeipinzhongdaima === '3420') {
this.jlbh2 = '(X)'
} else if (data.ysjl.shebeipinzhongdaima === '3430') {
this.jlbh2 = '(Z)'
}
} else {
this.jlbh2 = '(C)'
}
this.getJyxm(1) this.getJyxm(1)
this.getSbList(undefined, 2) this.getSbList(undefined, 2)
this.getSbList(this.ysjl.shebeileibiedaima, 3) this.getSbList(this.ysjl.shebeileibiedaima, 3)
@ -1010,19 +1006,21 @@ export default {
this.ysjl = data this.ysjl = data
this.departmentId = this.ysjl.departmentId this.departmentId = this.ysjl.departmentId
this.ysjl.imagePath = '' this.ysjl.imagePath = ''
if ( if (this.ysjl.jianyanrenyuan) {
this.ysjl.jianyanrenyuan !== null &&
this.ysjl.jianyanrenyuan.length > 0
) {
this.jianyanrenyuan = this.common.convertCnName( this.jianyanrenyuan = this.common.convertCnName(
this.ysjl.jianyanrenyuan this.ysjl.jianyanrenyuan
) )
} }
this.ysjlService if (this.ysjl.source === 'pad' && !this.ysjl.jilubianhao) {
.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id) this.buildJlbh2()
.then((data) => { this.getMaxBh()
this.isRepeat = data } else {
}) this.ysjlService
.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
.then((data) => {
this.isRepeat = data
})
}
this.getJyxm(1) this.getJyxm(1)
this.getSbList(undefined, 2) this.getSbList(undefined, 2)
this.getSbList(this.ysjl.shebeileibiedaima, 3) this.getSbList(this.ysjl.shebeileibiedaima, 3)

Loading…
Cancel
Save