-
+
职业病设置 /
- 毒害因素
+ 毒害因素
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
- {{ dddw(poisonType, "id", scope.row.poisonTypeId, "displayName") }}
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.creationTime | dateFormat }}
-
-
-
-
- {{ scope.row.lastModificationTime | dateFormat }}
-
-
-
-
-
-
-
-
-
-
-
+
+
+ {{ scope.row.creationTime | dateFormat }}
+
+
+
+
+ {{ scope.row.lastModificationTime | dateFormat }}
+
+
+
+
+
+
+
+
+
+
-
-
-
新增
-
- 编辑
-
-
- 删除
-
-
- 置顶
-
-
- 置底
-
-
- 排序
-
-
+
+
+
新增
+
+ 编辑
+
+
+ 删除
+
+
+ 置顶
-
-
+
+ 置底
+
+
+ 排序
+
+
+ 取消
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -236,8 +154,13 @@ import {
examinationdragging,
} from "../../request/systemapi";
import { postapi } from '@/api/api';
-import { deepCopy,dddw } from "../../utlis/proFunc";
+import { deepCopy, dddw } from "../../utlis/proFunc";
+import PoisonAsbitem from "../../components/occDisease/PoisonAsbitem.vue"
+
export default {
+ components: {
+ PoisonAsbitem,
+ },
data() {
return {
isshow: true,
@@ -249,9 +172,9 @@ export default {
tableData: [],
initTableData: [],
curRow: {},
- department:"",
- quckDepartment:[],
- poisonType:[]
+ department: "",
+ quckDepartment: [],
+ poisonType: []
};
},
created() {
@@ -261,21 +184,21 @@ export default {
mounted() {
this.rowDrop();
},
- computed: {
+ computed: {
...mapState(["window"]),
},
methods: {
dddw,
- getbaselist(){
- postapi("/api/app/PoisonType/GetList").then((res) => {
- if(res.code!=-1){
+ getbaselist() {
+ postapi("/api/app/PoisonType/GetList").then((res) => {
+ if (res.code != -1) {
this.poisonType = [...res.data];
}
});
},
//点击列表通过id查询
- rowick(row) {
- this.curRow = { ...row };
+ rowClick(row) {
+ this.curRow = row;
// listsid(row.id).then((res) => {
// if(res.code!=-1){
// this.curRow = { ...res.data };
@@ -289,7 +212,7 @@ export default {
this.initTableData.forEach((item) => {
if (
item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) >
- -1 ||
+ -1 ||
item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
// || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
) {
@@ -302,26 +225,26 @@ export default {
},
quckDepartments(e) {
if (e) {
- this.tableData.forEach((item,index) => {
+ this.tableData.forEach((item, index) => {
if (e == item.id) {
this.$refs["tableData"].setCurrentRow(item);
- this.rowick(item);
- this.searchup(item,index)
+ this.rowClick(item);
+ this.searchup(item, index)
}
});
} else {
this.remoteMethodes();
}
},
- searchup(data,index) {
+ searchup(data, index) {
if (index == 0) {
- index = 1;
- }
- const targetTop = this.$refs["tableData"].$el.querySelectorAll('.el-table__body tr')[index-1].getBoundingClientRect().top
+ index = 1;
+ }
+ const targetTop = this.$refs["tableData"].$el.querySelectorAll('.el-table__body tr')[index - 1].getBoundingClientRect().top
const containerTop = this.$refs["tableData"].$el.querySelector('.el-table__body').getBoundingClientRect().top
const scrollParent = this.$refs["tableData"].$el.querySelector('.el-table__body-wrapper')
scrollParent.scrollTop = targetTop - containerTop
-},
+ },
cancellation() {
this.$message.info("取消操作");
this.isshow = true;
@@ -335,12 +258,12 @@ export default {
// const currentDisplayOrder = this.tableData.length -1
// const currentDisplayOrder = this.initTableData[index].displayOrder;
// if (item.displayOrder != currentDisplayOrder) {
- // 如果它的displayOrder和它当前所在的位置不同代表挪动过位置
- result.push({ id: item.id, displayOrder: index+1 });
+ // 如果它的displayOrder和它当前所在的位置不同代表挪动过位置
+ result.push({ id: item.id, displayOrder: index + 1 });
// }
});
- postapi("/api/app/Poison/UpdateSortMany",{ itemList: result }).then((res) => {
- if(res.code!=-1){
+ postapi("/api/app/Poison/UpdateSortMany", { itemList: result }).then((res) => {
+ if (res.code != -1) {
this.getlist();
this.isshow = true;
//this.$message.success('操作成功')
@@ -357,9 +280,9 @@ export default {
animation: 300,
// 指定父元素下可被拖拽的子元素
// draggable: ".module-manager .el-table__row",
- onChoose({oldIndex}){
+ onChoose({ oldIndex }) {
_this.$refs['tableData'].setCurrentRow(_this.tableData[oldIndex]);
- _this.rowick(_this.tableData[oldIndex])
+ _this.rowClick(_this.tableData[oldIndex])
},
onEnd({ newIndex, oldIndex }) {
// console.log(arr);
@@ -383,8 +306,8 @@ export default {
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
- postapi("/api/app/Poison/UpdateManySort",{poisonId:this.form.id, sortType:1}).then((res) => {
- if(res.code!=-1){
+ postapi("/api/app/Poison/UpdateManySort", { poisonId: this.form.id, sortType: 1 }).then((res) => {
+ if (res.code != -1) {
this.getlist();
//this.$message.success('操作成功')
}
@@ -396,8 +319,8 @@ export default {
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
- postapi("/api/app/Poison/UpdateManySort",{poisonId:this.form.id, sortType:2}).then((res) => {
- if(res.code!=-1){
+ postapi("/api/app/Poison/UpdateManySort", { poisonId: this.form.id, sortType: 2 }).then((res) => {
+ if (res.code != -1) {
this.getlist();
//this.$message.success('操作成功')
}
@@ -414,19 +337,19 @@ export default {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
- cancelButtonClass:"difference",
- confirmButtonClass:"commonbutton"
+ cancelButtonClass: "difference",
+ confirmButtonClass: "commonbutton"
})
.then(() => {
- postapi("/api/app/Poison/Delete",{poisonId:this.form.id}).then((res) => {
- if(res.code!=-1){
- this.curRow=this.$options.data().curRow
+ postapi("/api/app/Poison/Delete", { poisonId: this.form.id }).then((res) => {
+ if (res.code != -1) {
+ this.curRow = this.$options.data().curRow
this.getlist();
//this.$message.success('删除成功')
}
});
})
- .catch(() => {});
+ .catch(() => { });
// deletecol(this.form.id).then((res) => {
// console.log("删除成功");
// this.getlist();
@@ -441,8 +364,8 @@ export default {
} else {
this.title = 2;
this.dialogVisible = true;
- postapi("/api/app/Poison/Get",{poisonId:this.form.id}).then((res) => {
- if(res.code!=-1){
+ postapi("/api/app/Poison/Get", { poisonId: this.form.id }).then((res) => {
+ if (res.code != -1) {
this.form = res.data;
}
});
@@ -453,33 +376,33 @@ export default {
if (this.form.displayName == undefined || this.form.displayName == "") {
this.$message.warning("请输入名称");
} else {
- if (this.title == 1) {
- postapi("/api/app/Poison/Create",{ displayName: this.form.displayName,poisonTypeId:this.form.poisonTypeId }).then((res) => {
+ if (this.title == 1) {
+ postapi("/api/app/Poison/Create", { displayName: this.form.displayName, poisonTypeId: this.form.poisonTypeId }).then((res) => {
// this.form.displayName = "";
- if(res.code!=-1){
+ if (res.code != -1) {
this.getlist();
this.dialogVisible = false;
//this.$message.success('新增成功')
}
});
- } else if (this.title == 2) {
- postapi("/api/app/Poison/Update",{poisonId:this.form.id,poisonTypeId:this.form.poisonTypeId, displayName: this.form.displayName }).then(
+ } else if (this.title == 2) {
+ postapi("/api/app/Poison/Update", { poisonId: this.form.id, poisonTypeId: this.form.poisonTypeId, displayName: this.form.displayName }).then(
(res) => {
- if(res.code!=-1){
- this.getlist();
- this.dialogVisible = false;
- //this.$message.success('修改成功')
- }
+ if (res.code != -1) {
+ this.getlist();
+ this.dialogVisible = false;
+ //this.$message.success('修改成功')
+ }
}
);
- }
+ }
}
},
//新增弹框
add() {
this.dialogVisible = true;
this.title = 1;
- this.form=this.$options.data().form
+ this.form = this.$options.data().form
this.$nextTick(() => {
this.$refs.refinput.focus();
});
@@ -487,10 +410,10 @@ export default {
//
getlist() {
postapi("/api/app/Poison/GetList").then((res) => {
- if(res.code!=-1){
+ if (res.code != -1) {
this.initTableData = [...res.data];
this.tableData = res.data;
- this.quckDepartment=[...res.data]
+ this.quckDepartment = [...res.data]
}
});
},
@@ -504,33 +427,41 @@ export default {
@import "../../assets/css/global_form.css";
@import "../../assets/css/global_input.css";
@import "../../assets/css/global.css";
+
.box {
display: flex;
flex-direction: column;
}
+
:deep .el-form-item {
margin-bottom: 14px;
}
+
/* el-dialog的头部样式 */
:deep .el-dialog__header {
padding: 11px 20px 11px;
}
+
/* el-dialog的主体样式 */
:deep .el-dialog__body {
padding: 0px 20px 0px;
}
+
/* el-divider样式 */
:deep .el-divider--horizontal {
margin: 0px 0 12px;
}
+
/* el-dialog的底部样式 */
:deep .el-dialog__footer {
padding: 0px 20px 14px;
}
+
.seachinput {
width: 250px;
margin-right: 110px;
}
+
:deep .seachinput .el-select {
width: 100%;
}