Browse Source

提交接口修改

master
xiaobai 3 years ago
parent
commit
8bed60b691
  1. 2
      src/api/instrument.js
  2. 10
      src/views/bjd/dj_input.vue
  3. 2
      src/views/bjd/dj_list.vue
  4. 2
      src/views/bjd/dt_list.vue
  5. 10
      src/views/bjd/jj_input.vue
  6. 2
      src/views/bjd/jj_list.vue
  7. 2
      src/views/bjd/zf_list.vue
  8. 10
      src/views/bjd/zj_input.vue
  9. 366
      src/views/dic/category.vue
  10. 2
      src/views/tool/quartz.vue
  11. 4
      src/views/ysjl/1000/dj/sy/sysy.vue
  12. 4
      src/views/ysjl/1000/dj/wb/gywb.vue
  13. 2
      src/views/ysjl/2000/2100/zbg/dj/edit.vue
  14. 4
      src/views/ysjl/2000/2100/zbg/nd/edit.vue
  15. 4
      src/views/ysjl/7000/jj/edit.vue
  16. 2
      src/views/ysjl/8000/dj/edit.vue
  17. 4
      src/views/zjd/zjbg_list.vue
  18. 2
      src/views/zjd/zjd_list.vue

2
src/api/instrument.js

@ -30,7 +30,7 @@ export function del(params) {
export function getDepartmentStatistical() {
return api({
url: '/instrument/getDepartmentStatistical',
url: '/instrument/statistic/getDepartmentStatistical',
method: 'get'
})
}

10
src/views/bjd/dj_input.vue

@ -2297,15 +2297,15 @@ export default {
}
this.bjd.jianyanleibie = 'DJ'
this.bjd.totalNum = this.tableData.length
let url = ''
let type = ''
if (this.formState === 'create' || this.formState === 'newBuild') {
url = 'bjd/saveBjd'
type = 'post'
} else {
url = 'bjd/updateBjd'
type = 'put'
}
this.apibjd({
url: url,
method: 'post',
url: '/bjd',
method: type,
data: {
bjd: this.bjd,
paramList: this.tableData,

2
src/views/bjd/dj_list.vue

@ -355,7 +355,7 @@ export default {
type: 'warning'
}).then(() => {
this.apibjd({
url: '/bjd/delBjd',
url: '/bjd',
method: 'delete',
params: { bjdIds: this.ids.join(',') }
}).then(data => {

2
src/views/bjd/dt_list.vue

@ -318,7 +318,7 @@ export default {
type: 'warning'
}).then(() => {
this.apibjd({
url: '/bjd/delBjd',
url: '/bjd',
method: 'delete',
params: {
bjdIds: this.multipleSelection.map(rw => {

10
src/views/bjd/jj_input.vue

@ -1502,15 +1502,15 @@ export default {
if (this.bjd.ziliaozhonglei === '' || this.bjd.ziliaozhonglei === undefined || this.bjd.ziliaozhonglei === null) {
this.bjd.ziliaozhonglei = '3'
}
let url = ''
let type = ''
if (this.formState === 'create' || this.formState === 'newBuild') {
url = 'bjd/saveBjd'
type = 'post'
} else {
url = 'bjd/updateBjd'
type = 'put'
}
this.apibjd({
url: url,
method: 'post',
url: '/bjd',
method: type,
data: {
bjd: this.bjd,
paramList: this.tableData,

2
src/views/bjd/jj_list.vue

@ -369,7 +369,7 @@ export default {
type: 'warning'
}).then(() => {
this.apibjd({
url: '/bjd/delBjd',
url: '/bjd',
method: 'delete',
params: {
bjdIds: this.multipleSelection.map(rw => {

2
src/views/bjd/zf_list.vue

@ -184,7 +184,7 @@ export default {
type: 'warning'
}).then(() => {
this.apibjd({
url: '/bjd/delBjd',
url: '/bjd',
method: 'delete',
params: { bjdIds: this.ids }
}).then(data => {

10
src/views/bjd/zj_input.vue

@ -924,15 +924,15 @@ export default {
}
}
this.bjd.totalNum = this.tableData.length
let url = ''
let type = ''
if (this.formState === 'newBuild') {
url = 'bjd/saveBjd'
type = 'post'
} else {
url = 'bjd/updateBjd'
type = 'put'
}
this.apibjd({
url: url,
method: 'post',
url: '/bjd',
method: type,
data: {
bjd: this.bjd,
paramList: this.tableData,

366
src/views/dic/category.vue

@ -6,15 +6,39 @@
<div class="filter-container">
<el-form>
<el-form-item>
<el-input v-model="listQuery.code" placeholder="请输入类别代码" clearable style="width: 200px" @keyup.enter.native="handleFilter" />
<el-input v-model="listQuery.name" placeholder="请输入类别名称" clearable style="width: 200px" @keyup.enter.native="handleFilter" />
<el-button type="primary" icon="el-icon-search" @click="handleFilter">
<el-input
v-model="listQuery.code"
placeholder="请输入类别代码"
clearable
style="width: 200px"
@keyup.enter.native="handleFilter"
/>
<el-input
v-model="listQuery.name"
placeholder="请输入类别名称"
clearable
style="width: 200px"
@keyup.enter.native="handleFilter"
/>
<el-button
type="primary"
icon="el-icon-search"
@click="handleFilter"
>
查询
</el-button>
<el-button type="primary" icon="el-icon-edit" @click="showCreate">
<el-button
type="primary"
icon="el-icon-edit"
@click="showCreate"
>
添加
</el-button>
<el-button type="danger" icon="el-icon-delete" @click="deleteCategory">
<el-button
type="danger"
icon="el-icon-delete"
@click="deleteCategory"
>
删除
</el-button>
</el-form-item>
@ -31,23 +55,57 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="40" />
<el-table-column type="index" align="center" label="序号" width="50" />
<el-table-column align="center" label="检验类别名称" prop="name" width="100" />
<el-table-column align="center" label="检验类别代码" prop="code" width="80" />
<el-table-column :formatter="formatSpecies" align="center" label="设备种类" prop="species" />
<el-table-column
type="index"
align="center"
label="序号"
width="50"
/>
<el-table-column
align="center"
label="检验类别名称"
prop="name"
width="100"
/>
<el-table-column
align="center"
label="检验类别代码"
prop="code"
width="80"
/>
<el-table-column
:formatter="formatSpecies"
align="center"
label="设备种类"
prop="species"
/>
<el-table-column align="center" label="操作" prop="" min-width="20">
<template slot-scope="scope">
<el-button type="primary" size="medium" title="修改" @click="showUpdate(scope.$index)">
<el-button
type="primary"
size="medium"
title="修改"
@click="showUpdate(scope.$index)"
>
修改
</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="totalCount>0" :total="totalCount" :page-num.sync="listQuery.pageNum" :page-row.sync="listQuery.pageSize" @pagination="getList" />
<pagination
v-show="totalCount > 0"
:total="totalCount"
:page-num.sync="listQuery.pageNum"
:page-row.sync="listQuery.pageSize"
@pagination="getList"
/>
</el-card>
</el-col>
<el-col :span="12">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>字典详情</span>
</div>
<el-table
ref="list"
:data="list"
@ -57,26 +115,64 @@
highlight-current-row
@row-click="onRowClick"
@selection-change="handleSelectionChange"
v-if="list.length > 0"
>
<el-table-column type="selection" width="40" />
<el-table-column type="index" align="center" label="序号" width="80" />
<el-table-column align="center" label="检验类别名称" prop="name" min-width="40" />
<el-table-column align="center" label="检验类别代码" prop="code" min-width="40" />
<el-table-column :formatter="formatSpecies" align="center" label="设备种类" prop="species" />
<el-table-column
type="index"
align="center"
label="序号"
width="80"
/>
<el-table-column
align="center"
label="检验类别名称"
prop="name"
min-width="40"
/>
<el-table-column
align="center"
label="检验类别代码"
prop="code"
min-width="40"
/>
<el-table-column
:formatter="formatSpecies"
align="center"
label="设备种类"
prop="species"
/>
<el-table-column align="center" label="操作" prop="" min-width="20">
<template slot-scope="scope">
<el-button type="primary" size="medium" title="修改" @click="showUpdate(scope.$index)">
<el-button
type="primary"
size="medium"
title="修改"
@click="showUpdate(scope.$index)"
>
修改
</el-button>
</template>
</el-table-column>
</el-table>
<div v-else>点击左侧字典查看详情</div>
</el-card>
</el-col>
</el-row>
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" @close="closeDialog">
<el-form ref="tempCategory" :model="tempCategory" class="small-space" label-position="left" label-width="120px" style="width: 300px; margin-left:50px;">
<el-dialog
:title="textMap[dialogStatus]"
:visible.sync="dialogFormVisible"
@close="closeDialog"
>
<el-form
ref="tempCategory"
:model="tempCategory"
class="small-space"
label-position="left"
label-width="120px"
style="width: 300px; margin-left: 50px"
>
<el-form-item label="检验类别名称" prop="name" required>
<el-input v-model="tempCategory.name" type="text" />
</el-form-item>
@ -108,10 +204,12 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">
</el-button>
<el-button v-if="dialogStatus==='create'" type="success" @click="createCategory">
<el-button @click="dialogFormVisible = false"> </el-button>
<el-button
v-if="dialogStatus === 'create'"
type="success"
@click="createCategory"
>
</el-button>
<el-button v-else type="primary" @click="updateCategory">
@ -123,9 +221,9 @@
</template>
<script>
import Pagination from '@/components/Pagination'
import Pagination from "@/components/Pagination";
export default {
name: 'Category',
name: "Category",
components: { Pagination },
data() {
return {
@ -135,198 +233,198 @@ export default {
listQuery: {
pageNum: 1, //
pageSize: 20,
orderBy: 'sort asc',
parentId: ''
orderBy: "sort asc",
parentId: "",
},
dialogStatus: 'create',
dialogStatus: "create",
dialogFormVisible: false,
textMap: {
update: '编辑',
create: '新建检验类别'
update: "编辑",
create: "新建检验类别",
},
tempCategory: {},
multipleSelection: [],
sbzlList: [],
species: [],
parentList: [],
leftList: []
}
leftList: [],
};
},
created() {
// this.getList()
this.getSbzlList()
this.getParentList()
this.getLeftList()
this.getSbzlList();
this.getParentList();
this.getLeftList();
},
methods: {
getList() {
this.api({
url: '/category/list',
method: 'get',
params: this.listQuery
}).then(data => {
this.list = data.list
this.totalCount = data.total
})
url: "/category/list",
method: "get",
params: this.listQuery,
}).then((data) => {
this.list = data.list;
this.totalCount = data.total;
});
},
handleFilter() {
//
this.listQuery.pageNum = 1
this.getList()
this.listQuery.pageNum = 1;
this.getList();
},
onRowClick(row) {
this.$refs.list.toggleRowSelection(row)
this.listQuery.parentId = row.id
this.getList()
this.$refs.list.toggleRowSelection(row);
this.listQuery.parentId = row.id;
this.getList();
},
handleSelectionChange: function(val) {
this.multipleSelection = val
handleSelectionChange: function (val) {
this.multipleSelection = val;
},
showCreate() {
this.tempCategory = {}
this.dialogStatus = 'create'
this.dialogFormVisible = true
this.tempCategory = {};
this.dialogStatus = "create";
this.dialogFormVisible = true;
},
createCategory() {
this.$refs['tempCategory'].validate(valid => {
this.$refs["tempCategory"].validate((valid) => {
if (valid) {
this.tempCategory.species = JSON.stringify(this.species)
this.tempCategory.species = JSON.stringify(this.species);
this.api({
url: '/category/addCategory',
method: 'post',
data: this.tempCategory
url: "/category/addCategory",
method: "post",
data: this.tempCategory,
}).then(() => {
this.$message({ message: '添加成功。', type: 'success' })
this.getList()
this.dialogFormVisible = false
})
this.$message({ message: "添加成功。", type: "success" });
this.getList();
this.dialogFormVisible = false;
});
} else {
return false
return false;
}
})
});
},
showUpdate($index) {
this.tempCategory = this.list[$index]
this.species = JSON.parse(this.tempCategory.species)
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.tempCategory = this.list[$index];
this.species = JSON.parse(this.tempCategory.species);
this.dialogStatus = "update";
this.dialogFormVisible = true;
},
updateCategory() {
this.$refs['tempCategory'].validate(valid => {
this.$refs["tempCategory"].validate((valid) => {
if (valid) {
this.tempCategory.species = JSON.stringify(this.species)
this.tempCategory.species = JSON.stringify(this.species);
this.api({
url: '/category/updateCategory',
method: 'post',
data: this.tempCategory
url: "/category/updateCategory",
method: "post",
data: this.tempCategory,
}).then(() => {
this.$message({ message: '数据更新成功。', type: 'success' })
this.getList()
this.dialogFormVisible = false
})
this.$message({ message: "数据更新成功。", type: "success" });
this.getList();
this.dialogFormVisible = false;
});
} else {
return false
return false;
}
})
});
},
deleteCategory() {
if (this.multipleSelection.length === 0) {
this.$message({
type: 'error',
message: '请选中需要删除的数据!'
})
return false
type: "error",
message: "请选中需要删除的数据!",
});
return false;
} else {
this.$confirm('确定删除当前选中记录?', '提示', {
confirmButtonText: '确定',
this.$confirm("确定删除当前选中记录?", "提示", {
confirmButtonText: "确定",
showCancelButton: true,
type: 'warning'
type: "warning",
}).then(() => {
const pks = []
const qs = require('qs')
this.multipleSelection.forEach(category => {
pks.push(category.id)
})
const pks = [];
const qs = require("qs");
this.multipleSelection.forEach((category) => {
pks.push(category.id);
});
this.api({
url: '/category/delCategory',
method: 'delete',
url: "/category/delCategory",
method: "delete",
params: {
pks: pks
pks: pks,
},
paramsSerializer: function (params) {
return qs.stringify(params, { indices: false });
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(() => {
this.$message({ message: '删除成功。', type: 'success' })
this.getList()
})
})
this.$message({ message: "删除成功。", type: "success" });
this.getList();
});
});
}
},
getSbzlList() {
this.api({
url: '/sedirectory/getList',
method: 'get',
url: "/sedirectory/getList",
method: "get",
params: {
sbzl: undefined,
level: '1'
}
}).then(data => {
this.sbzlList = data
})
level: "1",
},
}).then((data) => {
this.sbzlList = data;
});
},
getParentList() {
this.api({
url: '/category/all',
method: 'get',
url: "/category/all",
method: "get",
params: {
parentCode: null,
species: null
}
}).then(data => {
this.parentList = data
})
species: null,
},
}).then((data) => {
this.parentList = data;
});
},
getLeftList() {
this.api({
url: '/category/getTopLevel',
method: 'get',
url: "/category/getTopLevel",
method: "get",
params: {
pageNum: 10,
pageSize: 10
}
}).then(data => {
this.leftList = data.list
})
pageSize: 10,
},
}).then((data) => {
this.leftList = data.list;
});
},
closeDialog() {
this.species = []
this.species = [];
},
formatSpecies(row, column, cellValue) {
const value = JSON.parse(cellValue)
let lable = ''
const value = JSON.parse(cellValue);
let lable = "";
for (let i = 0; i < value.length; i++) {
for (let j = 0; j < this.sbzlList.length; j++) {
if (value[i] === this.sbzlList[j].value) {
lable = this.sbzlList[j].label + ',' + lable
break
lable = this.sbzlList[j].label + "," + lable;
break;
}
}
}
return lable.substring(0, lable.length - 1)
return lable.substring(0, lable.length - 1);
},
tableRowClassName({ row }) {
if (row.parentId === null) {
return 'main-row'
return "main-row";
} else {
return ''
return "";
}
}
}
}
},
},
};
</script>
<style>
.el-table .main-row {
background: #f0f9eb;
}
.el-table .main-row {
background: #f0f9eb;
}
</style>

2
src/views/tool/quartz.vue

@ -216,7 +216,7 @@ export default {
})
},
subDelete(id) {
deletejobFn({ id: id }).then(() => {
deletejobFn({ ids: id }).then(() => {
this.$refs[id].doClose()
this.getList()
this.$notify.success('删除成功')

4
src/views/ysjl/1000/dj/sy/sysy.vue

@ -539,9 +539,9 @@ export default {
})
return false
}
url = 'put'
type = 'put'
} else if (operation === 'upd') {
url = 'put'
type = 'put'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })

4
src/views/ysjl/1000/dj/wb/gywb.vue

@ -608,9 +608,9 @@ export default {
})
return false
}
url = 'put'
type = 'put'
} else if (operation === 'upd') {
url = 'put'
type = 'put'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })

2
src/views/ysjl/2000/2100/zbg/dj/edit.vue

@ -1545,7 +1545,7 @@ export default {
})
} else if (operation === 'upd') {
this.saveSyt()
url = 'put'
type = 'put'
this.save(operation, type)
}
},

4
src/views/ysjl/2000/2100/zbg/nd/edit.vue

@ -484,12 +484,12 @@ export default {
this.$message.error('请先办结无损分项原始记录再生成报告!')
return false
} else {
url = 'put'
type = 'put'
this.save(operation, type)
}
})
} else if (operation === 'upd') {
url = 'put'
type = 'put'
this.save(operation, type)
}
},

4
src/views/ysjl/7000/jj/edit.vue

@ -548,9 +548,9 @@ export default {
})
return false
}
url = 'put'
type = 'put'
} else if (operation === 'upd') {
url = 'put'
type = 'put'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })

2
src/views/ysjl/8000/dj/edit.vue

@ -1009,7 +1009,7 @@ export default {
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.save(operation, url)
this.save(operation, type)
} else if (operation === 'build') {
if (this.ysjl.jianyanrenyuan === null || this.ysjl.jianyanrenyuan === '') {
this.$message({

4
src/views/zjd/zjbg_list.vue

@ -313,7 +313,7 @@ export default {
return rw.id
}).join(',')
this.api({
url: 'zjd/saveZjd',
url: '/zjd',
method: 'post',
data: this.zhuanjiao
}).then(data => {
@ -385,7 +385,7 @@ export default {
return rw.id
}).join(',')
this.api({
url: 'zjd/saveZjd',
url: '/zjd',
method: 'post',
data: this.zhuanjiao
}).then(data => {

2
src/views/zjd/zjd_list.vue

@ -170,7 +170,7 @@ export default {
},
getList() {
this.api({
url: '/zjd/getList',
url: '/zjd',
method: 'get',
params: this.listQuery
}).then(data => {

Loading…
Cancel
Save