检查leader bug

This commit is contained in:
caoqianming 2021-05-11 13:36:15 +08:00
parent 90abf36c61
commit 6c21b1eaf6
7 changed files with 15 additions and 12 deletions

View File

@ -2,8 +2,8 @@
ENV = 'development' ENV = 'development'
# base api # base api
VUE_APP_BASE_API = 'http://10.0.11.127:8000/api' # VUE_APP_BASE_API = 'http://10.0.11.127:8000/api'
#VUE_APP_BASE_API = 'http://127.0.0.1:8000/api' VUE_APP_BASE_API = 'http://127.0.0.1:8000/api'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable, # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
# to control whether the babel-plugin-dynamic-import-node plugin is enabled. # to control whether the babel-plugin-dynamic-import-node plugin is enabled.

View File

@ -314,8 +314,8 @@ export default {
//创建子任务 //创建子任务
async confirm(form) { async confirm(form) {
this.inspecttask.inspecttask=this.$route.params.inpecttask; this.inspecttask.inspecttask=this.$route.params.id;
console.log(this.inspecttask)
createsubinspecttask(this.inspecttask).then((res) => { createsubinspecttask(this.inspecttask).then((res) => {
this.dialogVisible = false; this.dialogVisible = false;

View File

@ -160,7 +160,7 @@
}, },
onShow() { onShow() {
this.getSubtaskDept(); this.getSubtaskDept();
this.getRecords() this.getRecords();
}, },
methods: { methods: {
getSubtaskDept() { getSubtaskDept() {
@ -202,7 +202,6 @@
} }
}, },
sectionChange(index) { sectionChange(index) {
console.log(index)
this.currentIndex = index; this.currentIndex = index;
}, },
sectionChange2(val){ sectionChange2(val){

View File

@ -19,7 +19,7 @@
<u-button @click="submit" type="warning" >登录</u-button> <u-button @click="submit" type="warning" >登录</u-button>
</view> </view>
<view class="alternative"> <view class="alternative">
<navigator url="login_password" class="password" open-type="redirect">密码登录</navigator> <navigator url="login_password" class="password" open-type="navigate">密码登录</navigator>
</view> </view>
</view> </view>
<u-verification-code seconds="30" ref="uCode" @change="codeChange"></u-verification-code> <u-verification-code seconds="30" ref="uCode" @change="codeChange"></u-verification-code>
@ -46,7 +46,7 @@
export default { export default {
data() { data() {
return { return {
imageURL: 'http://testsearch.ctc.ac.cn:8000/media/default/banner3.jpg', imageURL: '/static/banner3.jpg',
loginForm:{ loginForm:{
mail:"", mail:"",
msg:"" msg:""

View File

@ -24,7 +24,7 @@
export default { export default {
data() { data() {
return { return {
imageURL: 'http://testsearch.ctc.ac.cn:8000/media/default/banner3.jpg', imageURL: '/static/banner3.jpg',
loginForm:{ loginForm:{
username:"", username:"",
password:"" password:""

View File

@ -34,11 +34,11 @@ const store = new Vuex.Store({
vuex_user: lifeData.vuex_user ? lifeData.vuex_user : {}, vuex_user: lifeData.vuex_user ? lifeData.vuex_user : {},
vuex_token: lifeData.vuex_token ? lifeData.vuex_token : '', vuex_token: lifeData.vuex_token ? lifeData.vuex_token : '',
// vuex_host: 'http://127.0.0.1:8000', // vuex_host: 'http://127.0.0.1:8000',
// vuex_api: 'http://127.0.0.1:8000/api', vuex_api: 'http://127.0.0.1:8000/api',
// vuex_apifile: 'http://127.0.0.1:8000/api/file/', // vuex_apifile: 'http://127.0.0.1:8000/api/file/',
vuex_host: 'https://testsearch.ctc.ac.cn', vuex_host: 'https://testsearch.ctc.ac.cn',
vuex_api: 'https://testsearch.ctc.ac.cn/api', //vuex_api: 'https://testsearch.ctc.ac.cn/api',
vuex_apifile: 'https://testsearch.ctc.ac.cn/api/file/', vuex_apifile: 'https://testsearch.ctc.ac.cn/api/file/',
// 如果vuex_version无需保存到本地永久存储无需lifeData.vuex_version方式 // 如果vuex_version无需保存到本地永久存储无需lifeData.vuex_version方式

View File

@ -136,7 +136,11 @@ class InspectDeptSerializer(serializers.ModelSerializer):
return queryset return queryset
def get_leader(self, obj): def get_leader(self, obj):
return InspectTeam.objects.filter(subtask=obj.subtask).first().member.pk try:
pk = InspectTeam.objects.get(subtask=obj.subtask, type='组长').member.pk
return pk
except:
return None
class InspectRecordCheckSerializer(serializers.ModelSerializer): class InspectRecordCheckSerializer(serializers.ModelSerializer):