Commit b407e6b5 authored by 李苏's avatar 李苏 💬

树与新增接口

parent c93ed50b
......@@ -104,6 +104,14 @@ export function doQueryCfbz(query) {
})
}
export function doQueryCfbzByUser(query) {
return request({
url: '/aqgl/swgl/swcfbz/queryByUser',
method: 'post',
data: query||{}
})
}
export function doCommit(query) {
return request({
url: `/aqgl/swgl/swjl/doCommit`,
......
......@@ -14,7 +14,7 @@
<!--<RelSelect style="width: 100%;" :readonly="readonly" src='aqgl/swgl/swcfbz/query' :match="{value:'id',label:'swdjName' + 'wglxName'}" v-model='form.swbzid' ></RelSelect>-->
<!--</el-form-item>-->
<el-form-item label="处罚标准" ref="swbzid" prop="swbzid">
<el-select style="width: 100%;" v-model="form.swbzid" placeholder="">
<el-select style="width: 100%;" v-model="form.swbzid" placeholder="">
<el-option v-for="(item,index) in cfbzList" :key="item.id" :label="item.wglxName + '______' + item.swdjName" :value="item.id"></el-option>
</el-select>
</el-form-item>
......@@ -159,14 +159,25 @@
</template>
<script>
import {editMixin} from 'common'
import {doQueryCfbz} from '@/api/threeViolations/enterTV.js';
import {doQueryCfbzByUser} from '@/api/threeViolations/enterTV.js';
export default {
computed:{
userid:function(){
return this.form.userid
}
},
watch:{
userid(){
this.form.swbzid=''
doQueryCfbzByUser({userid:this.form.userid}).then(e => {
this.cfbzList = e.data.records || []
})
}
},
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {
doQueryCfbz({}).then(e => {
this.cfbzList = e.data.records || []
})
},
/* 组件名称*/
name: "enterTVEdit",
......
......@@ -12,16 +12,16 @@
<el-row :gutter="20">
<!-- 公司,班组-->
<el-col :span="12">
<el-col :span="24">
<el-form-item label="公司" ref="gsid" prop="gsid">
<RelSelect style="width: 100%;" :readonly="readonly" src='jcsj/common/bm/queryGs' :match="{value:'id',label:'bmmc'}" v-model='form.gsid' ></RelSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<!-- <el-col :span="12">
<el-form-item label="班组" ref="bmid" prop="bmid">
<RelSelect linkage :linkParams="{pid:form.gsid}" :readonly="readonly" style="width: 100%;" src='jcsj/common/bm/queryBz' filterable clearable :match="{value:'id',label:'bmmc'}" v-model='form.bmid' ></RelSelect>
</el-form-item>
</el-col>
</el-col> -->
<el-col :span="12">
<el-form-item label="三违等级" ref="swdj" prop="swdj">
<RelSelect style="width: 100%;" src='/aqgl/swgl/swcfbz/init/swdj' clearable :match="{value:'id',label:'name'}" v-model='form.swdj' ></RelSelect>
......@@ -79,11 +79,8 @@
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
gsid:'',
bmid:'',
//ID
id:'',
gsid:'',
//序号
xh:'',
//三违内容
......
<template>
<div class="min_full">
<div style="display: flex;">
<div class="min_full" style="width: 200px;border-right: 0px;">
<TreeBase :app='app' :dgtype='4' @selected='selectedTree'></TreeBase>
</div>
<div class="min_full" style="width: calc(100% - 200px)">
<!-- <div class="min_full"> -->
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='app'></SearchButton>
<el-row :gutter="20" class="search-row-1">
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">公司:</span>
<RelSelect style="width: 100%;" src='jcsj/common/bm/queryGs' :match="{value:'id',label:'bmmc'}" v-model='queryParams.gsid' ></RelSelect>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">班组:</span>
<RelSelect linkage :linkParams="{pid:queryParams.gsid}" style="width: 100%;" src='jcsj/common/bm/queryBz' filterable clearable :match="{value:'id',label:'bmmc'}" v-model='queryParams.bmid' ></RelSelect>
</div>
</el-col>
</el-row>
</div>
<!-- 按钮操作-->
<el-row class="tool-bar">
......@@ -43,11 +34,15 @@
</TablePager>
</div>
</div>
</div>
</template>
<script>
/* 引入需要的接口*/
/* 引入需要的接口*/
import {
queryGsTree
} from "@/api/train/planning.js";
import {
doQuery,
doAdd,
......@@ -65,7 +60,7 @@
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
// this.$refs['TablePager'].pageQuery()
},
data() {
return {
......@@ -77,6 +72,12 @@
DialogTitle: '',
/* 基础url*/
baseUrl: '/aqgl/swgl/swcfbz',
/* 树的标题 */
treeTitle: '公司列表',
treeDefaultProps: {
children: 'children',
label: 'bmmc'
},
/* 查询参数*/
queryParams: {
wgnr: '',
......@@ -101,7 +102,10 @@
}
},
methods: {
selectedTree(e){
this.queryParams.gsid=e.id||'root'
this.$refs['TablePager'].pageQuery()
},
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
......@@ -109,6 +113,7 @@
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
apiTreeQuery: queryGsTree,
/* 初始化赋值操作*/
init() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment