|
@@ -39,15 +39,10 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="服务类型" prop="type">
|
|
|
<el-checkbox-group v-if="isModifyMode" v-model="project.type">
|
|
|
- <el-checkbox label="0" name="type">{{serviceType[0]}}</el-checkbox>
|
|
|
- <el-checkbox label="1" name="type">{{serviceType[1]}}</el-checkbox>
|
|
|
- <el-checkbox label="2" name="type">{{serviceType[2]}}</el-checkbox>
|
|
|
- <el-checkbox label="3" name="type">{{serviceType[3]}}</el-checkbox>
|
|
|
- <el-checkbox label="4" name="type">{{serviceType[4]}}</el-checkbox>
|
|
|
- <el-checkbox label="5" name="type">{{serviceType[5]}}</el-checkbox>
|
|
|
- <el-checkbox label="6" name="type">{{serviceType[6]}}</el-checkbox>
|
|
|
+ <span v-for="(item,index) in serviceType" :key="index">
|
|
|
+ <el-checkbox :label="item" name="type">{{item}} </el-checkbox>
|
|
|
+ </span>
|
|
|
</el-checkbox-group>
|
|
|
- <!--<span v-if="!isModifyMode" class="badge" v-for="item in project.type">{{serviceType[item]}}</span>-->
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="file" label="项目需求文档">
|
|
|
<el-upload
|
|
@@ -228,9 +223,9 @@
|
|
|
<script>
|
|
|
import Http from '@/js/http.js'
|
|
|
import Apis from '@/js/api.js'
|
|
|
-import ServiceType from '@/constants/enum/service-type.js'
|
|
|
import PlatformType from '@/constants/enum/platform-type.js'
|
|
|
import {notify} from '@/constants/index'
|
|
|
+import {getAllServiceTypes} from '@/js/index'
|
|
|
|
|
|
export default {
|
|
|
name: 'ProjectAdd',
|
|
@@ -239,7 +234,7 @@ export default {
|
|
|
userId: 0,
|
|
|
dialogVisible: false,
|
|
|
isModifyMode: true,
|
|
|
- serviceType: ServiceType,
|
|
|
+ serviceType: [],
|
|
|
platform: PlatformType,
|
|
|
isFormSubmit: true,
|
|
|
downloadFile: '123.xls',
|
|
@@ -422,7 +417,15 @@ export default {
|
|
|
}]
|
|
|
}
|
|
|
},
|
|
|
+ mounted () {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.init()
|
|
|
+ })
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ init () {
|
|
|
+ this.setServiceType()
|
|
|
+ },
|
|
|
//加载数据
|
|
|
loadData: function () {
|
|
|
},
|
|
@@ -542,6 +545,9 @@ export default {
|
|
|
this.dialogVisible = false
|
|
|
this.resetForm()
|
|
|
},
|
|
|
+ setServiceType () {
|
|
|
+ this.serviceType = getAllServiceTypes()
|
|
|
+ }
|
|
|
},
|
|
|
created: function () {
|
|
|
}
|