Commit 8166f311 authored by 李苏's avatar 李苏 💬

调整

parent 20902d50
......@@ -2380,7 +2380,21 @@ export const powerRoutes = [{
link: null,
mkid: 909000000
},
children: [{
children: [
{
component: 'outsourcingDirector/wxdwgljg/index',
hidden: false,
meta: {
"title": "外协单位管理架构",
"icon": "",
"noCache": false,
"link": null,
"mkid": 909000100,
},
name: 'wxdwgljg',
path: "wxdwgljg"
},
{
component: 'outsourcingDirector/declare/index',
hidden: false,
meta: {
......
<template>
<RelDialog :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<!-- 填写表单内容,slot=form必写-->
<el-form slot="form" ref="form" :model="form" label-width="140px" :rules="rules">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="外协单位编码" ref="code" prop="code">
<el-input v-model="form.code"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="外协单位名称" ref="name" prop="name">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="上级单位" ref="pid" prop="type">
<el-select clearable style="width: 100%;" v-model="form.pid" placeholder="">
<el-option v-for="(item,index) in bmList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" ref="bz" prop="bz">
<el-input v-model="form.bz"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- 按钮重写, -->
<!-- <div slot="reFooter">
<span slot="footer">
重写按钮写在这里,根据需要重写 slot(reFooter,foorer) 节点样式 重写方法需要在此页重新定义
</span>
</div> -->
</RelDialog>
</template>
<script>
import {
editMixin
} from 'common'
export default {
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {
this.app.query().then(e => {
this.bmList = e.data.records
// this.bmList.unshift({bmid:e.data.id,bmmc:e.data.name,id:e.data.id})
})
},
/* 组件名称*/
name: 'appVersionEdit',
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() {
return {
/* 额外初始化,根据需求*/
bmList: [],
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
pid: '',
bz: '',
name: '',
code: '',
},
/* form提交时的规则,具体规则参考官网*/
rules: {
code: [{
required: true,
trigger: 'blur',
message: '该内容必填'
}, ],
name: [{
required: true,
trigger: 'blur',
message: '该内容必填'
}]
}
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>
<template>
<div class="min_full">
<!-- 按钮操作-->
<el-row class="tool-bar">
<PrintButton :app='app'></PrintButton>
<ViewButton ref="view" :app='app'></ViewButton>
<AddButton ref="add" :app='app'></AddButton>
<CopyButton ref="copy" :app='app'></CopyButton>
<EditButton ref="edit" :app='app'></EditButton>
<FieldButton :app='app'></FieldButton>
<ExcelButton :app='app'></ExcelButton>
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
type='treeTable' :getTreeMethod='getTreeMethod' @getRow='getRow'>
<!-- <template slot="tabCustom">
<el-table-column label="启用/停用" width="90" header-align="center" >
<template slot-scope="scope" v-if="scope.row.id" >
<el-switch @click.native="setEnable(scope.row.id)" :value='tybz(scope)' style="width: 80px;justify-content: center;"
active-color="#13ce66" inactive-color="#eee">
</el-switch>
</template>
</el-table-column>
</template> -->
</TablePager>
</div>
</div>
</template>
<script>
/* 引入需要的接口*/
import {
QueryBm,
// QueryApptype,
AddBm,
DeleteBm,
UpdateBm,
qtBm
} from "./organizationalManagement.js";
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
rowKey: 'bmid',
/*需要的额外参数 */
typeMap: [],
systemType: [],
baseUrl: 'jcsj/ubm',
/* 查询参数*/
queryParams: {},
/* 表格标题对应参数*/
tableTitle: [{
prop: 'code',
label: '外协单位编码',
width: '300'
},
{
prop: 'name',
label: '外协单位名称',
width: '120'
},
{
prop: 'bz',
label: '备注',
width: '140'
},
{
prop: 'whr',
label: '维护人',
width: '100'
},
{
prop: 'whsj',
label: '维护时间',
...this.$common('ftDateTime')
},
]
}
},
methods: {
getTreeMethod(that,list) {
let treeData =list
treeData = that.dgData(treeData, 'root')
that.tableData = [{
/* 具体mc需要确定后传过来 */
id: false,
code: 'root',
name: '根目录',
children: treeData,
}]
that.expandKeys = [false]
that.$emit('getData', that.tableData)
}
,
tybz(a) {
let nTy = false
nTy = (a.row.tybz == 'N' ? true : false)
return nTy
},
/* 启用停用*/
setEnable(id) {
this.$confirm('是否启用/停用该部门, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {
id: id
}
qtBm(params).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.$refs['TablePager'].reLoad()
} else {
this.$error(res.message || '操作失败')
}
})
})
},
/* 基础查询*/
query: QueryBm,
/* 基础增*/
apiAdd: AddBm,
/* 基础更新*/
apiUpdate: UpdateBm,
/* 删除操作*/
apiDelete: DeleteBm,
/* 初始化赋值操作*/
},
/* 注册组件*/
components: {
Edit
}
}
</script>
<style scoped>
</style>
import request from 'common/src/utils/request'
export function QueryBm(query) {
return request({
url: 'aqgl/uwxdwgljg/query',
method: 'post',
data: query||{}
})
}
export function AddBm(query) {
return request({
url: 'aqgl/uwxdwgljg/add',
method: 'post',
data: query||{}
})
}
export function DeleteBm(query) {
return request({
url: 'aqgl/uwxdwgljg/delete',
method: 'post',
data: query||{}
})
}
export function UpdateBm(query) {
return request({
url: 'aqgl/uwxdwgljg/update',
method: 'post',
data: query||{}
})
}
export function qtBm(query) {
return request({
url: 'aqgl/uwxdwgljg/record/qt',
method: 'post',
data: query||{}
})
}
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