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>
<el-date-picker
v-model="query.jieyueTime"
type="date"
placeholder="选择借阅日期"
@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-input v-model="query.baogaobianhao" type="date" placeholder="报告编号" @change="crud.toQuery" />
<el-input v-model="query.baogaobianhao" type="date" placeholder="报告编号" @change="crud.toQuery" />
<el-input v-model="query.baogaobianhao" type="date" placeholder="报告编号" @change="crud.toQuery" />
<el-input v-model="query.baogaobianhao" type="date" placeholder="报告编号" @change="crud.toQuery" />
<el-button type="primary" icon="el-icon-search" @click="crud.toQuery">
查询
</el-button>

22
src/views/device_management/index.vue

@ -31,24 +31,24 @@
<query :crud="crud" />
</div>
<crud :permission="permission">
<el-upload
slot="right"
class="filter-item"
:show-file-list="false"
:before-upload="beforeUpload"
accept="application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
action=""
<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-upload
slot="right"
class="filter-item"
: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>
</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>
</el-button>-->
</crud>
</div>
<!--表格内容-->

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

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

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

@ -507,13 +507,6 @@
</el-form-item>
</el-col>
</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 v-if="fromType !== 5 && fromType !== 6">
<legend>设备技术参数</legend>
@ -937,6 +930,21 @@ export default {
handleChange(v) {
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() {
this.ysjlService.init(this.$route.query).then((data) => {
this.ysjl = data.ysjl
@ -946,19 +954,7 @@ export default {
this.ysjl.cjState = 'ysjl'
this.ysjl.xianchangjianyantiaojian = '符合'
this.departmentId = this.ysjl.departmentId
if (data.ysjl.shebeileibiedaima === '3300') {
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.buildJlbh2()
this.getJyxm(1)
this.getSbList(undefined, 2)
this.getSbList(this.ysjl.shebeileibiedaima, 3)
@ -1010,19 +1006,21 @@ export default {
this.ysjl = data
this.departmentId = this.ysjl.departmentId
this.ysjl.imagePath = ''
if (
this.ysjl.jianyanrenyuan !== null &&
this.ysjl.jianyanrenyuan.length > 0
) {
if (this.ysjl.jianyanrenyuan) {
this.jianyanrenyuan = this.common.convertCnName(
this.ysjl.jianyanrenyuan
)
}
this.ysjlService
.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
.then((data) => {
this.isRepeat = data
})
if (this.ysjl.source === 'pad' && !this.ysjl.jilubianhao) {
this.buildJlbh2()
this.getMaxBh()
} else {
this.ysjlService
.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
.then((data) => {
this.isRepeat = data
})
}
this.getJyxm(1)
this.getSbList(undefined, 2)
this.getSbList(this.ysjl.shebeileibiedaima, 3)

Loading…
Cancel
Save