发布任务语言改为字典

main
lijingyu007 10 months ago
parent 740701773b
commit 7bab90184a
  1. 10
      src/api/crowdsource/crowdsource.js
  2. 10
      src/page/homepage/crowdsourcing/publishtasks.vue

@ -183,5 +183,15 @@ export function getType() {
}) })
} }
// 语言字典
export function languageType() {
return request({
url: '/system/dict/data/type/task_language',
method: 'get',
headers: {
isToken: false
},
})
}

@ -45,9 +45,7 @@
allow-create allow-create
style="width: 726px" style="width: 726px"
> >
<el-option label="python" value="python"></el-option> <el-option v-for="it in languageList" :key="it.dictCode" :label="it.dictLabel" :value="it.dictLabel"></el-option>
<el-option label="java" value="java"></el-option>
<el-option label="C++" value="C++"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -234,7 +232,7 @@
</template> </template>
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { publishTask, getApply, homecrowdlist, editTask, getType } from '@/api/crowdsource/crowdsource' import { publishTask, getApply, homecrowdlist, editTask, getType, languageType } from '@/api/crowdsource/crowdsource'
import { onsiteTypelist } from '@/const/dict/commondict' import { onsiteTypelist } from '@/const/dict/commondict'
import { processStatuslist } from '@/const/dict/commondict' import { processStatuslist } from '@/const/dict/commondict'
import NonimageUpload from '@/page/common/NonimageUpload' import NonimageUpload from '@/page/common/NonimageUpload'
@ -433,6 +431,7 @@ export default {
basetarget: process.env.VUE_APP_BASE_TARGET, basetarget: process.env.VUE_APP_BASE_TARGET,
// //
mianyicheck: false, mianyicheck: false,
languageList: []
} }
}, },
filters: { filters: {
@ -447,6 +446,9 @@ export default {
}, },
components: { quillEditor, NonimageUpload, MultiUpload, CheckBox }, components: { quillEditor, NonimageUpload, MultiUpload, CheckBox },
created() { created() {
languageType().then(res => {
this.languageList = res.data
})
// console.log('taskform.attachment',this.taskform.attachment) // console.log('taskform.attachment',this.taskform.attachment)
let applyId = this.$route.query.applyId let applyId = this.$route.query.applyId
if (applyId) { if (applyId) {

Loading…
Cancel
Save