|
|
@@ -48,13 +48,29 @@
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="责任单位" style="flex: 1" class="ml-20">
|
|
|
- <el-input v-model="form.responsible_unit" placeholder="责任单位" />
|
|
|
+ <div class="full-width">
|
|
|
+ <avue-input-tree
|
|
|
+ default-expand-all
|
|
|
+ v-model="form.responsible_unit"
|
|
|
+ placeholder="责任单位"
|
|
|
+ :dic="deptDic"
|
|
|
+ class="full-width"
|
|
|
+ ></avue-input-tree>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
|
|
|
<div class="full-width flex">
|
|
|
<el-form-item label="主管单位" style="flex: 1">
|
|
|
- <el-input v-model="form.competent_unit" placeholder="主管单位" />
|
|
|
+ <div class="full-width">
|
|
|
+ <avue-input-tree
|
|
|
+ default-expand-all
|
|
|
+ v-model="form.competent_unit"
|
|
|
+ placeholder="责任单位"
|
|
|
+ :dic="deptDic"
|
|
|
+ class="full-width"
|
|
|
+ ></avue-input-tree>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="责任领导" style="flex: 1" class="ml-20">
|
|
|
<el-input
|
|
|
@@ -303,6 +319,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { useStore } from '@/store/user.js'
|
|
|
+
|
|
|
export default {
|
|
|
name: 'params1',
|
|
|
props: {
|
|
|
@@ -315,11 +333,16 @@ export default {
|
|
|
default: null
|
|
|
}
|
|
|
},
|
|
|
+ setup() {
|
|
|
+ const user = useStore()
|
|
|
+ return { user }
|
|
|
+ },
|
|
|
watch: {
|
|
|
detail: {
|
|
|
handler(val) {
|
|
|
this.form = val
|
|
|
this.form.construction_start_and_end_new = ''
|
|
|
+ this.form.competent_unit = val.competent_unit ? val.competent_unit : ''
|
|
|
if (this.form.name) {
|
|
|
const xian = this.form.name.indexOf('县')
|
|
|
this.form.name = this.dev
|
|
|
@@ -347,14 +370,34 @@ export default {
|
|
|
{ label: '否', value: 0 },
|
|
|
{ label: '是', value: 1 }
|
|
|
],
|
|
|
+ deptDic: [],
|
|
|
dev: false
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
this.dev = sessionStorage.getItem('dev') === 'true'
|
|
|
this.areaList()
|
|
|
+ this.getDepList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ getDepList() {
|
|
|
+ const local = {
|
|
|
+ label: this.user.info.deptName,
|
|
|
+ value: this.user.info.deptId
|
|
|
+ }
|
|
|
+ this.deptDic.push(local)
|
|
|
+ this.$api.system
|
|
|
+ .getDeptLazy({ parentId: this.user.info.deptId })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ const tmp = res.data.map(ele => {
|
|
|
+ const item = { label: ele.deptName, value: ele.id }
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ this.deptDic = this.deptDic.concat(tmp)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
areaList() {
|
|
|
this.$api.common.region({ code: '' }).then(res => {
|
|
|
if (res.code === 200) {
|