Browse Source

改bug

master
unknown 6 days ago
parent
commit
9b991ee6ca
  1. 23
      src/components/FileUpload/index.vue
  2. 2
      src/views/business/Information/index.vue
  3. 109
      src/views/business/vote/index.vue
  4. 11
      src/views/login.vue
  5. 4
      src/views/system/oauth2/client/index.vue
  6. BIN
      新疆后台.zip

23
src/components/FileUpload/index.vue

@ -29,7 +29,8 @@
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
<li :key="file.url" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
<el-link :href="`${file.url}`" :underline="false" target="_blank">
<span class="el-icon-document oneRowText"> {{ getFileName(file.name) }} </span>
<span class="el-icon-document oneRowText"> {{ file.name }} </span>
<!-- <span class="el-icon-document oneRowText"> {{ getFileName(file.name) }} </span> -->
</el-link>
<div class="ele-upload-list__item-content-action ">
<el-link :underline="false" @click="handleDelete(index)" type="danger" class="oneRowText">删除</el-link>
@ -153,7 +154,7 @@ export default {
handleUploadSuccess(res, file) {
if (res.code === 0) {
// edit by
this.uploadList.push({ name: res.data, url: res.data });
this.uploadList.push({ name:file.name.split('.')[0], url: res.data });
this.uploadedSuccessfully();
} else {
this.number--;
@ -166,15 +167,29 @@ export default {
//
handleDelete(index) {
this.fileList.splice(index, 1);
this.$emit("input", this.listToString(this.fileList));
this.$emit("input", this.fileListMap(this.fileList));
},
fileListMap(list) {
return list
if(!list.length) return []
let arr = list.map(item=>{
let obj = {
name: item.name,
url: item.url
}
return obj
})
return arr
},
//
uploadedSuccessfully() {
if (this.number > 0 && this.uploadList.length === this.number) {
console.log(this.fileList, '分开', this.uploadList)
this.fileList = this.fileList.concat(this.uploadList);
this.uploadList = [];
this.number = 0;
this.$emit("input", this.listToString(this.fileList));
console.log(this.fileListMap(this.fileList))
this.$emit("input", this.fileListMap(this.fileList));
this.$modal.closeLoading();
}
},

2
src/views/business/Information/index.vue

@ -160,7 +160,7 @@ export default {
},
methods: {
inputFn(val) {
this.form.attachmentList = val.split(',')
this.form.attachmentList = val
},
/** 查询列表 */
getList() {

109
src/views/business/vote/index.vue

@ -128,7 +128,7 @@
<div class="ul" v-if="form.voteType == 3">
<div v-for="(item, index) in form.voteMultipleInfoList" :key="index" class="li">
<el-form-item label="议题" prop="startTime">
<el-form-item :label="`议题${index + 1}`" prop="startTime">
<el-input v-model="item.voteName" placeholder="请填议题内容" />
<el-button size="mini" type="text" icon="el-icon-plus" @click="handleItemAddVoteType3(1, item, index)"
v-if="index == form.voteMultipleInfoList.length - 1">增加议题</el-button>
@ -238,17 +238,20 @@
<el-divider content-position="left">投票结果</el-divider>
<div class="type3" v-if="form.voteType == 3">
<div class="ul2">
<div class="li2" v-for="(item, index) in form.voteMultipleItemInfoRespList" :key="index">
<div class="name" style="font-size: 18px;color: #333;font-weight: 600;margin-left: 30px;"> {{ item.voteName }} </div>
<div class="flex row" v-for="(item2,index2) in item.voteMultipleResultList" :key="index2">
<div class="lab" style="width: 100px; text-align: right;"> {{ item2.itemName }}</div>
<el-progress :percentage="item2.itemRate" style="width: 400px; margin: 0 20px;"/>
<!-- <el-progress :text-inside="true" :stroke-width="24" :percentage="item2.itemRate * 100" text-color="white"></el-progress> -->
<h3>{{ item2.itemCount }}</h3>
</div>
<div class="ul2">
<div class="li2" v-for="(item, index) in form.voteMultipleItemInfoRespList" :key="index">
<div class="name" style="font-size: 18px;color: #333;font-weight: 600;margin-left: 30px;"> {{
item.voteName }}
</div>
<div class="flex row" v-for="(item2, index2) in item.voteMultipleResultList" :key="index2">
<div class="lab" style="width: 100px; text-align: right;"> {{ item2.itemName }}</div>
<el-progress :percentage="item2.itemRate*1" style="width: 400px; margin: 0 20px;"
:text-inside="false" />
<!-- <el-progress :text-inside="true" :stroke-width="24" :percentage="item2.itemRate * 100" text-color="white"></el-progress> -->
<div style="line-height: 26px;">{{ item2.itemCount }}</div>
</div>
</div>
</div>
</div>
<el-row :gutter="20" v-for="(item, index) in form.voteResultVO" :key="index" v-else>
@ -267,15 +270,36 @@
<!-- v-if="form.userHiddenType==0" -->
<el-divider content-position="left" v-if="form.userHiddenType == 0">投票详情</el-divider>
<el-table :data="tableData" style="width: 100%" border v-if="form.userHiddenType == 0">
<el-table-column prop="date" label="投票选项" width="150" />
<el-table-column prop="name" :label="item.name" min-width="180" v-for="(item, index1) in tableData2"
:key="index1">
<template #default="scope">
<div class="a" v-for="(item2, index) in item.arr" :key="index">{{ item2.userName + ' | '+parseTime(item2.createTime)}}</div>
</template>
</el-table-column>
</el-table>
<div v-if="form.voteType == 3">
<el-table v-loading="loading" :data="voteType3List" border>
<el-table-column label="编号" type="index" width="50" align="center" fixed="left" />
<!-- <el-table-column label="议题名称" align="center" prop="voteName" min-width="140" show-overflow-tooltip> </el-table-column> -->
<el-table-column :label="`议题名称`" align="center" prop="voteName" min-width="140" show-overflow-tooltip>
<template slot-scope="scope">
<div style="padding-bottom: 20px;font-weight: 700;">{{ scope.row.voteName }}</div>
<el-table :data="scope.row.tableList">
<el-table-column label="选项名称" align="center" prop="itemName" min-width="140"
show-overflow-tooltip></el-table-column>
<el-table-column label="投票数量" align="center" prop="voteCount" min-width="140"
show-overflow-tooltip></el-table-column>
</el-table>
</template>
</el-table-column>
</el-table>
</div>
<!-- v-if="form.userHiddenType == 0" -->
<div v-else>
<el-table :data="tableData" style="width: 100%" border >
<el-table-column prop="date" label="投票选项" width="150" />
<el-table-column prop="name" :label="item.name" min-width="180" v-for="(item, index1) in tableData2"
:key="index1">
<template #default="scope">
<div class="a" v-for="(item2, index) in item.arr" :key="index">{{ item2.userName + ' |'+parseTime(item2.createTime)}}</div>
</template>
</el-table-column>
</el-table>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
@ -344,6 +368,7 @@ export default {
]
}
],
voteType3List: [],
tableData: [{
date: '投票人员',
name: 'Tom',
@ -413,12 +438,17 @@ export default {
},
methods: {
inputFn(val) {
this.form.attachmentList = val.split(',')
console.log(val)
this.form.attachmentList = val
},
handleQuery() {
this.getList();
},
reaplas(val) {
if(!val) return 0
return val.itemRate.replace('%', '')
},
resetQuery() {
this.queryParams = {}
this.getList();
@ -429,7 +459,7 @@ export default {
this.exportLoading = true;
return exportVoteResults({ id: this.form.id });
}).then(response => {
this.$download.excel(response, '投票结果.pdf');
this.$download.excel(response, this.form.voteName + '投票结果.pdf');
this.exportLoading = false;
}).catch(() => { });
},
@ -521,13 +551,17 @@ export default {
handleResult(row) {
this.tableData2 = [],
getVoteItem(row.id).then(res => {
this.resultVoteOpend = true;
this.form = res.data;
res.data.voteItemResultVOS.forEach(item => {
this.tableData2.push({ name: item.itemName, arr: item.voteUserVO })
})
if (row.voteType == 3) {
this.voteType3List = res.data.voteResultTableList
console.log(this.voteType3List,'数据')
} else {
res.data.voteItemResultVOS.forEach(item => {
this.tableData2.push({ name: item.itemName, arr: item.voteUserVO })
})
}
this.resultVoteOpend = true;
this.title = "投票结果"
})
@ -567,9 +601,11 @@ export default {
this.reset();
this.title = "修改投票"
this.textVote = false;
this.addVoteOpend = true;
this.loading = true
let _this = this
getVoteItem(row.id).then(res => {
_this.addVoteOpend = true;
_this.loading = false
if (!res.data.voteMultipleItemInfoRespList) {
res.data.voteMultipleInfoList = [
{
@ -577,24 +613,26 @@ export default {
"voteItemList": ['']
}
]
}else {
res.data.voteMultipleInfoList = res.data.voteMultipleItemInfoRespList.map(item=>{
} else {
res.data.voteMultipleInfoList = res.data.voteMultipleItemInfoRespList.map(item => {
let obj = {
"voteName": item.voteName,
voteItemList: item.voteMultipleResultList?item.voteMultipleResultList.map(item2=>item2.itemName):['']
voteItemList: item.voteMultipleResultList ? item.voteMultipleResultList.map(item2 => item2.itemName) : ['']
}
return obj
})
console.log(res.data.voteMultipleInfoList)
}
this.form = res.data;
console.log(this.form)
_this.form = res.data;
res.data.voteItemVO?.forEach(item => {
this.options.push({ id: item.id, value: item.itemName })
_this.options.push({ id: item.id, value: item.itemName })
})
})
if (!_this.options.length) {
_this.options = [{ id: '', value: '' }]
}
}).catch(() => { _this.loading = false })
},
@ -622,6 +660,7 @@ export default {
const values = this.options.map(obj => obj.value);
this.form.itemIds = values.toString();
this.form.voteRoomRangs = this.$refs.roomInfo?.getCheckedKeys(true).join(',')
this.$refs["form"].validate(valid => {
if (!valid) {
return;

11
src/views/login.vue

@ -22,7 +22,7 @@
</el-tabs>
<div>
<el-form ref="loginForm" :model="loginForm" :rules="LoginRules" class="login-form">
<el-form-item prop="tenantName" v-if="tenantEnable">
<!-- <el-form-item prop="tenantName" v-if="tenantEnable">
<el-select v-model="loginForm.tenantName" clearable placeholder="请选择" style="width: 320px">
<svg-icon slot="prefix" icon-class="tree" class="el-input__icon input-icon"/>
<el-option
@ -32,10 +32,7 @@
:value="item.name">
</el-option>
</el-select>
<!-- <el-input v-model="loginForm.tenantName" type="text" auto-complete="off" placeholder='租户'>-->
<!-- <svg-icon slot="prefix" icon-class="tree" class="el-input__icon input-icon"/>-->
<!-- </el-input>-->
</el-form-item>
</el-form-item> -->
<!-- 账号密码登录 -->
<div v-if="loginForm.loginType === 'uname'">
<el-form-item prop="username">
@ -84,14 +81,14 @@
</el-form-item>
<!-- 社交登录 -->
<el-form-item style="width:100%;">
<!-- <el-form-item style="width:100%;">
<div class="oauth-login" style="display:flex">
<div class="oauth-login-item" v-for="item in SysUserSocialTypeEnum" :key="item.type" @click="doSocialLogin(item)">
<img :src="item.img" height="25px" width="25px" alt="登录" >
<span>{{item.title}}</span>
</div>
</div>
</el-form-item>
</el-form-item> -->
</el-form>

4
src/views/system/oauth2/client/index.vue

@ -151,12 +151,12 @@ import { createOAuth2Client, updateOAuth2Client, deleteOAuth2Client, getOAuth2Cl
import ImageUpload from '@/components/ImageUpload';
import Editor from '@/components/Editor';
import {CommonStatusEnum} from "@/utils/constants";
import FileUpload from "@/components/FileUpload";
// import FileUpload from "@/components/FileUpload";
export default {
name: "SystemOAuth2Client",
components: {
FileUpload,
// FileUpload,
ImageUpload,
Editor,
},

BIN
新疆后台.zip

Loading…
Cancel
Save