字典获取

lijinlong
吕天方 1 year ago
parent bcf3d4f28a
commit b227b746aa

@ -4,7 +4,7 @@
* @Author: JC9527 * @Author: JC9527
* @Date: 2023-09-11 15:38:21 * @Date: 2023-09-11 15:38:21
* @LastEditors: JC9527 * @LastEditors: JC9527
* @LastEditTime: 2023-09-13 15:04:17 * @LastEditTime: 2023-09-13 17:07:25
*/ */
import request from '@/utils/request' import request from '@/utils/request'
@ -12,7 +12,7 @@ export default {
// 行政区划 // 行政区划
tree(params) { tree(params) {
return request({ return request({
url: "/pharmaceuticals/administrative/tree", url: "/administrative/tree",
method: "get", method: "get",
params, params,
}); });
@ -20,7 +20,7 @@ export default {
// 导入excel // 导入excel
importExcel(data) { importExcel(data) {
return request({ return request({
url: "/pharmaceuticals/bKeyEnterprise/common/importExcel", url: "/bKeyEnterprise/common/importExcel",
method: "post", method: "post",
data, data,
}); });
@ -28,7 +28,7 @@ export default {
// 企业基本信息 // 企业基本信息
basicList(params) { basicList(params) {
return request({ return request({
url: "/pharmaceuticals/info/list", url: "/info/list",
method: "get", method: "get",
params, params,
}) })
@ -37,7 +37,7 @@ export default {
bPlanManage(method,data = null, params = null, id){ bPlanManage(method,data = null, params = null, id){
console.log(id) console.log(id)
return request({ return request({
url: `/pharmaceuticals/bPlanManage${id ? `/${id}` : ''}`, url: `/bPlanManage${id ? `/${id}` : ''}`,
method, method,
data, data,
params params
@ -45,8 +45,15 @@ export default {
}, },
bPlanManageTwo(id){ bPlanManageTwo(id){
return request({ return request({
url: `/pharmaceuticals/bPlanManage/${id}`, url: `/bPlanManage/${id}`,
method:'get', method:'get',
}); });
}, },
dictdata(params){
return request({
url: `/pharmaceuticals/dictdata`,
method:'get',
params
});
}
}; };

@ -6,7 +6,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
append-to-body append-to-body
custom-class="dialog-boxed" custom-class="dialog-boxed"
width="70%" width="80%"
> >
<div class="dialog-slot"> <div class="dialog-slot">
<div class="closeClick"> <div class="closeClick">
@ -29,7 +29,7 @@
</div> </div>
<div v-if="!nextStep"> <div v-if="!nextStep">
<div class="filtrate"> <div class="filtrate">
<!-- <div class="select-input"> <div class="select-input">
<div class="select-span">行政区划:</div> <div class="select-span">行政区划:</div>
<el-cascader <el-cascader
@ -40,7 +40,7 @@
@change="handleChange"> @change="handleChange">
</el-cascader> </el-cascader>
</div> </div>
<div class="select-input"> <!-- <div class="select-input">
<div class="select-span">企业类型:</div> <div class="select-span">企业类型:</div>
<el-select v-model="form.frimType" placeholder="请选择"> <el-select v-model="form.frimType" placeholder="请选择">
<el-option <el-option
@ -52,7 +52,7 @@
</el-option> </el-option>
</el-select> </el-select>
</div> --> </div> -->
<!-- <div class="select-input"> <div class="select-input">
<div class="select-span">经济类型:</div> <div class="select-span">经济类型:</div>
<el-select v-model="form.economicsType" placeholder="请选择"> <el-select v-model="form.economicsType" placeholder="请选择">
<el-option <el-option
@ -63,8 +63,8 @@
> >
</el-option> </el-option>
</el-select> </el-select>
</div> --> </div>
<!-- <div class="select-input"> <div class="select-input">
<div class="select-span">行业类型:</div> <div class="select-span">行业类型:</div>
<el-select v-model="form.industryType" placeholder="请选择"> <el-select v-model="form.industryType" placeholder="请选择">
<el-option <el-option
@ -75,13 +75,20 @@
> >
</el-option> </el-option>
</el-select> </el-select>
</div> --> </div>
<div class="select-input"> <!-- <div class="select-input">
<div class="select-span">行业类型:</div> <div class="select-span">行业类型:</div>
<el-radio-group v-model="form.isPoint"> <el-radio-group v-model="form.isPoint">
<el-radio label="1"></el-radio> <el-radio label="1"></el-radio>
<el-radio label="0"></el-radio> <el-radio label="0"></el-radio>
</el-radio-group> </el-radio-group>
</div> -->
<div class="select-input">
<div class="select-span">是否重点:</div>
<el-select v-model="form.majorHazardLevel" placeholder="请选择">
<el-option label="是" value="1"></el-option>
<el-option label="否" value="0"></el-option>
</el-select>
</div> </div>
<div class="select-input"> <div class="select-input">
<div class="select-span">重大危险源等级:</div> <div class="select-span">重大危险源等级:</div>
@ -107,7 +114,7 @@
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div class="bottom"> <!-- <div class="bottom"> -->
<div class="input-input"> <div class="input-input">
<el-input <el-input
v-model="form.uscCode" v-model="form.uscCode"
@ -118,7 +125,7 @@
<div class="select-btn" @click="filtrate"></div> <div class="select-btn" @click="filtrate"></div>
<div class="select-btn select-btn1">导入</div> <div class="select-btn select-btn1">导入</div>
</div> </div>
</div> <!-- </div> -->
</div> </div>
<div class="tables" v-loading="loading"> <div class="tables" v-loading="loading">
<el-table <el-table
@ -368,6 +375,7 @@ export default {
}, },
loading:false, loading:false,
isamend:false, isamend:false,
amendId:'',
}; };
}, },
methods: { methods: {
@ -381,6 +389,7 @@ export default {
if(item == 'newlyIncreased') { if(item == 'newlyIncreased') {
this.getTable(this.pages); this.getTable(this.pages);
} else { } else {
this.amendId = item.id
this.isamend = true; this.isamend = true;
this.getList(item); this.getList(item);
this.getTable(this.pages); this.getTable(this.pages);
@ -478,6 +487,7 @@ export default {
let obj = {...this.form2,district,enterpriseId,createTime,keyCount,planNumb} let obj = {...this.form2,district,enterpriseId,createTime,keyCount,planNumb}
let data let data
if(this.isamend) { if(this.isamend) {
obj = {...obj,id:this.amendId}
data = await this.$api.yingji.bPlanManage('put',obj) data = await this.$api.yingji.bPlanManage('put',obj)
if(data.code == 200){ if(data.code == 200){
this.$message({ this.$message({
@ -522,7 +532,11 @@ export default {
} }
}, },
async mounted(){ async mounted(){
let data = await this.$api.yingji.tree(); let data = await this.$api.yingji.tree(); //
let listOne = await this.$api.yingji.dictdata({list:'economic_categories'}); //
let listTwo = await this.$api.yingji.dictdata({list:'category'}); //
let listThree = await this.$api.yingji.dictdata({list:'major_hazard_level'}); //
let listFour = await this.$api.yingji.dictdata({list:'entpr_color'}); //
this.commentData(data.data) this.commentData(data.data)
} }
}; };
@ -686,14 +700,12 @@ export default {
} }
} }
} }
.bottom { // .bottom {
display: flex; // display: flex;
justify-content: space-between; // justify-content: space-between;
width: 100%; // width: 100%;
.btns { //
display: flex; // }
}
}
.input-input { .input-input {
margin: 20px 40px 0 0; margin: 20px 40px 0 0;
width: 250px; width: 250px;
@ -703,6 +715,9 @@ export default {
} }
} }
} }
.btns {
display: flex;
}
.select-btn { .select-btn {
margin: 20px 0 0 0; margin: 20px 0 0 0;
width: 80px; width: 80px;
@ -720,7 +735,7 @@ export default {
} }
.select-btn1 { .select-btn1 {
background: #28b384; background: #28b384;
margin-left: 40px; margin-left: 20px;
} }
} }
.tables { .tables {

Loading…
Cancel
Save