|
|
@@ -42,13 +42,35 @@
|
|
|
<el-form-item class="full-width flex-child-average">
|
|
|
<div class="flex flex-center full-width item">
|
|
|
<span class="title">责任单位:</span>
|
|
|
- <el-input></el-input>
|
|
|
+ <el-select
|
|
|
+ v-model="form.responsible_unit"
|
|
|
+ placeholder="请选择项目标签"
|
|
|
+ class="full-width"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in form.tags === 1 ? deptDic : compDic"
|
|
|
+ :key="item.dictValue"
|
|
|
+ :label="item.dictValue"
|
|
|
+ :value="item.dictKey"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item class="full-width flex-child-average">
|
|
|
<div class="flex flex-center full-width item">
|
|
|
<span class="title">主管单位:</span>
|
|
|
- <el-input></el-input>
|
|
|
+ <el-select
|
|
|
+ v-model="form.competent_unit"
|
|
|
+ placeholder="请选择项目标签"
|
|
|
+ class="full-width"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in deptDic"
|
|
|
+ :key="item.dictValue"
|
|
|
+ :label="item.dictValue"
|
|
|
+ :value="item.dictKey"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item class="full-width flex-child-average">
|
|
|
@@ -73,14 +95,78 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item class="full-width flex-child-average">
|
|
|
<div class="flex flex-center full-width item">
|
|
|
- <span class="title">所属领域:</span>
|
|
|
+ <span class="title">所属行业:</span>
|
|
|
<el-input></el-input>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item class="full-width flex-child-average">
|
|
|
<div class="flex flex-center full-width item">
|
|
|
- <span class="title">所属行业:</span>
|
|
|
- <el-input></el-input>
|
|
|
+ <span class="title">产业项目:</span>
|
|
|
+ <el-select
|
|
|
+ v-model="form.social_investment"
|
|
|
+ placeholder="是否是产业项目"
|
|
|
+ class="full-width"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in yesOrNo"
|
|
|
+ :key="item.label"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div class="flex flex-justify-center">
|
|
|
+ <el-form-item class="full-width flex-child-average">
|
|
|
+ <div class="flex flex-center full-width item">
|
|
|
+ <span class="title">民间投资项目:</span>
|
|
|
+ <el-select
|
|
|
+ v-model="form.social_investment"
|
|
|
+ placeholder="是否民间投资项目"
|
|
|
+ class="full-width"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in yesOrNo"
|
|
|
+ :key="item.label"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item class="full-width flex-child-average">
|
|
|
+ <div class="flex flex-center full-width item">
|
|
|
+ <span class="title">获得资金支持:</span>
|
|
|
+ <el-select
|
|
|
+ v-model="form.social_investment"
|
|
|
+ placeholder="是否获得资金支持"
|
|
|
+ class="full-width"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in yesOrNo"
|
|
|
+ :key="item.label"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item class="full-width flex-child-average">
|
|
|
+ <div class="flex flex-center full-width item">
|
|
|
+ <span class="title">项目标签:</span>
|
|
|
+ <el-select
|
|
|
+ v-model="form.project_stage"
|
|
|
+ placeholder="请选择项目标签"
|
|
|
+ class="full-width"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in projectSituation"
|
|
|
+ :key="item.dictValue"
|
|
|
+ :label="item.dictValue"
|
|
|
+ :value="item.dictKey"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
@@ -90,7 +176,7 @@
|
|
|
class="flex flex-center flex-justify-start full-width"
|
|
|
style="width: 99%"
|
|
|
>
|
|
|
- <span style="width: 90px" class="text-left">项目位置:</span>
|
|
|
+ <span style="width: 100px" class="text-left">项目位置:</span>
|
|
|
<div class="full-width">
|
|
|
<map-picker
|
|
|
:project-id="form.id"
|
|
|
@@ -101,12 +187,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
- <el-form-item class="full-width" style="flex: 1">
|
|
|
- <div class="flex flex-center full-width item">
|
|
|
- <span class="title">项目标签:</span>
|
|
|
- <el-input></el-input>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
</div>
|
|
|
<div class="flex flex-justify-center">
|
|
|
<el-form-item class="full-width" style="flex: 1">
|
|
|
@@ -149,6 +229,7 @@
|
|
|
import wtCard from '@/components/wt-card/index.vue'
|
|
|
import areaPicker from '@/components/area-picker/index.vue'
|
|
|
import mapPicker from '@/views/project/componens/map-picker.vue'
|
|
|
+import { useStore } from '@/store/user.js'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -168,31 +249,89 @@ export default {
|
|
|
info: {
|
|
|
handler(val) {
|
|
|
this.form = val
|
|
|
- this.mapForm = [
|
|
|
- this.form.latitude,
|
|
|
- this.form.longitude,
|
|
|
- this.form.address
|
|
|
- ]
|
|
|
+ if (val.tags === 1) {
|
|
|
+ // 1 政府项目,主管单位和责任单位都为政府机构
|
|
|
+ this.getDepList()
|
|
|
+ } else {
|
|
|
+ // 2 企业项目,主管单位为机构,责任单位为企业
|
|
|
+ this.getDepList()
|
|
|
+ this.getCompList()
|
|
|
+ }
|
|
|
+ this.getDict('project-situation')
|
|
|
+ // fixme需要接口
|
|
|
+ this.getChildDict('industry-classification')
|
|
|
},
|
|
|
immediate: true
|
|
|
- },
|
|
|
- mapForm: {
|
|
|
- handler(val) {
|
|
|
- this.form.latitude = val[0]
|
|
|
- this.form.longitude = val[1]
|
|
|
- this.form.address = val[2]
|
|
|
- },
|
|
|
- immediate: false
|
|
|
}
|
|
|
},
|
|
|
+ setup() {
|
|
|
+ const user = useStore()
|
|
|
+ return { user }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
disabled: true,
|
|
|
form: {},
|
|
|
- photoList: []
|
|
|
+ photoList: [],
|
|
|
+ yesOrNo: [
|
|
|
+ {
|
|
|
+ label: '否',
|
|
|
+ value: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '是',
|
|
|
+ value: 1
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ projectSituation: [],
|
|
|
+ deptDic: [],
|
|
|
+ compDic: []
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getDict(code) {
|
|
|
+ this.$api.common.dicList({ code }).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.projectSituation = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getChildDict(code) {
|
|
|
+ this.$api.common.dicChildList({ code }).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.projectSituation = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ 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, deptCategory: 3 })
|
|
|
+ .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)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getCompList() {
|
|
|
+ this.$api.system.getNewDeptLazy({ deptCategory: 4 }).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ const tmp = res.data.map(ele => {
|
|
|
+ const item = { label: ele.deptName, value: ele.id }
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ this.compDic = this.compDic.concat(tmp)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
save() {
|
|
|
if (this.photoList.length > 0) {
|
|
|
this.$api.project.addPhotoProject(this.photoList).then(res => {
|
|
|
@@ -230,12 +369,12 @@ export default {
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.title {
|
|
|
- width: 100px;
|
|
|
+ width: 120px;
|
|
|
text-align: left;
|
|
|
}
|
|
|
|
|
|
.title-textarea {
|
|
|
- width: 85px;
|
|
|
+ width: 100px;
|
|
|
text-align: left;
|
|
|
}
|
|
|
|