This commit is contained in:
hezhengao 2024-04-15 14:41:14 +08:00
parent 2b83081e81
commit f194291538
7 changed files with 70 additions and 55 deletions

View File

@ -133,3 +133,10 @@ export function deptTreeSelect() {
method: 'get'
})
}
//解绑
export function unbinding(userId) {
return request({
url: '/system/user/unbinding?userId=' + userId,
method: 'get'
})
}

View File

@ -41,7 +41,6 @@
<script>
import { getToken } from "@/utils/auth";
export default {
name: "FileUpload",
props: {
@ -60,7 +59,7 @@ export default {
// , ['png', 'jpg', 'jpeg']
fileType: {
type: Array,
default: () => ["doc", "xls", "ppt", "txt", "pdf"],
default: () => ["doc", "xls", "ppt", "txt", "pdf","jpg","png","xlsx"],
},
//
isShowTip: {

View File

@ -1,10 +1,10 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="OpenID" prop="openid">
<el-form-item label="微信名称" prop="nickname">
<el-input
v-model="queryParams.openid"
placeholder="请输入OpenID"
v-model="queryParams.nickname"
placeholder="请输入微信名称"
clearable
@keyup.enter.native="handleQuery"
/>
@ -73,7 +73,7 @@
<el-table v-loading="loading" :data="wxuserList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="ID" align="center" prop="id" />
<el-table-column label="微信名称" align="center" prop="nickname" />
<el-table-column label="头像" align="center" prop="avatar" width="100">
<template slot-scope="scope">
@ -86,7 +86,6 @@
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.gender"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -137,9 +136,6 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>

View File

@ -1,14 +1,6 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<!-- <el-form-item label="项目管理表id" prop="projectId">-->
<!-- <el-input-->
<!-- v-model="queryParams.projectId"-->
<!-- placeholder="请输入项目管理表id"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="项目名称" prop="projectName">
<el-input
v-model="queryParams.projectName"
@ -17,22 +9,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="图片" prop="imageUrl">-->
<!-- <el-input-->
<!-- v-model="queryParams.imageUrl"-->
<!-- placeholder="请输入图片"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="附件" prop="fileUrl">-->
<!-- <el-input-->
<!-- v-model="queryParams.fileUrl"-->
<!-- placeholder="请输入附件"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -91,9 +68,19 @@
<!-- <el-table-column label="项目管理表id" align="center" prop="projectId" />-->
<el-table-column label="项目名称" align="center" prop="projectName" />
<el-table-column label="维保类型" align="center" prop="maintenanceType" />
<!-- <el-table-column label="图片" align="center" prop="imageUrl" />-->
<!-- <el-table-column label="附件" align="center" prop="fileUrl" />-->
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="图片" align="center" prop="imageUrl">
<template slot-scope="scope">
<el-button type="text" v-if="scope.row.imageUrl" @click="$download.resource(scope.row.imageUrl,false)" >下载</el-button>
<span v-else>未上传</span>
</template>
</el-table-column>
<el-table-column label="附件" align="center" prop="fileUrl">
<template slot-scope="scope">
<el-button type="text" v-if="scope.row.fileUrl" @click="$download.resource(scope.row.fileUrl)">下载</el-button>
<span v-else>未上传</span>
</template>
</el-table-column>
<!-- <el-table-column label="备注" align="center" prop="remark" /> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -123,7 +110,7 @@
/>
<!-- 添加或修改维保记录对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-dialog :title="title" :visible.sync="open" width="550px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<!-- <el-form-item label="项目管理表id" prop="projectId">-->
<!-- <el-input v-model="form.projectId" placeholder="请输入项目管理表id" />-->
@ -135,14 +122,14 @@
<el-input v-model="form.maintenanceType" placeholder="请输入维保类型" />
</el-form-item>
<el-form-item label="图片" prop="imageUrl">
<el-input v-model="form.imageUrl" placeholder="请输入图片" />
<!-- <el-input v-model="form.imageUrl" placeholder="请输入图片" /> -->
<upload v-model="form.imageUrl" :fileShow="true"></upload>
</el-form-item>
<el-form-item label="附件" prop="fileUrl">
<el-input v-model="form.fileUrl" placeholder="请输入附件" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
<upload v-model="form.fileUrl" :fileShow="true"></upload>
<!-- <el-input v-model="form.fileUrl" placeholder="请输入附件" /> -->
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -154,9 +141,12 @@
<script>
import { listInformation, getInformation, delInformation, addInformation, updateInformation } from "@/api/abuwx/information";
import upload from '@/components/FileUpload/index.vue'
export default {
name: "Information",
components: {
upload,
},
data() {
return {
//
@ -227,6 +217,7 @@ export default {
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;

View File

@ -35,9 +35,10 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="项目名称" align="center" prop="projectName" />
<el-table-column label="项目概况" align="center" prop="projectOverview" />
<el-table-column label="附件上传" align="center" prop="remark">
<el-table-column label="附件上传" align="center" prop="remark" >
<template slot-scope="scope">
<button v-if="scope.row.remark">下载</button>
<!-- <el-button size="mini" type="primary" v-if="scope.row.fileUrl" @click="handleDownLoadFilecod(scope.row)" >下载</el-button> -->
<el-button @click="$download.resource(scope.row.fileUrl,false)" type="text" v-if="scope.row.fileUrl">下载</el-button>
<span v-else>无附件</span>
</template>
</el-table-column>
@ -63,7 +64,7 @@
<el-form-item label="项目概况" prop="projectOverview">
<el-input type="textarea" v-model="form.projectOverview" placeholder="请输入项目概况" />
</el-form-item>
<el-form-item label="上传图片" prop="avatar">
<el-form-item label="附件" prop="avatar">
<!-- <image-upload v-model="form.avatar"/> -->
<upload v-model="form.fileUrl" :fileShow="true"></upload>
</el-form-item>
@ -75,6 +76,7 @@
</el-dialog>
<!-- 二维码 -->
<el-dialog :visible.sync="codeOpen" width="250px" append-to-body>
<div>项目名称<span>{{ this.titles }}</span></div>
<div>
<vue-qr ref="qrCode" :text="texturl" :logoSrc="logoSrc" :color-dark="randomColor"></vue-qr>
</div>
@ -101,11 +103,12 @@ export default {
},
data() {
return {
downLoadUrl :process.env.VUE_APP_BASE_API,
//
loading: true,
//
codeOpen: false,
titles: '项目名称',
titles: '',
logoSrc: '',
randomColor: 'black',
texturl: ``,
@ -160,9 +163,11 @@ export default {
},
//
openerweima(row) {
this.texturl = `https://xiaofangweibao.jsxinyuansu.com/pages/index?id=${row.id}`
this.titles=row.projectName
this.texturl = `http://58.223.177.154:8082?id=${row.id}`
this.codeOpen = true
},
//
reset() {
this.form = {

View File

@ -2,7 +2,7 @@
<div class="app-container">
<el-row :gutter="20">
<!--部门数据-->
<el-col :span="4" :xs="24">
<el-col :span="4" :xs="20">
<div class="head-container">
<el-input
v-model="deptName"
@ -137,12 +137,12 @@
</el-row>
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
<el-table-column type="selection" width="25" align="center" />
<el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" width="80"/>
<el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
<el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" />
<el-table-column label="OpenID" align="center" prop="openid" v-if="columns[5].visible" :show-overflow-tooltip="true"/>
<el-table-column label="状态" align="center" key="status" v-if="columns[6].visible">
<template slot-scope="scope">
@ -162,7 +162,7 @@
<el-table-column
label="操作"
align="center"
width="160"
width="200"
class-name="small-padding fixed-width"
>
<template slot-scope="scope" v-if="scope.row.userId !== 1">
@ -173,6 +173,13 @@
@click="handleUpdate(scope.row)"
v-hasPermi="['system:user:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUnbing(scope.row)"
v-hasPermi="['system:user:edit']"
>解绑</el-button>
<el-button
size="mini"
type="text"
@ -349,7 +356,7 @@
</template>
<script>
import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect,unbinding } from "@/api/system/user";
import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@ -490,6 +497,15 @@ export default {
this.deptOptions = response.data;
});
},
//
handleUnbing(row){
console.log(row);
unbinding(row.userId).then(res=>{
console.log(res);
this.$message.success('解绑成功')
this.getList()
})
},
//
filterNode(value, data) {
if (!value) return true;

View File

@ -35,6 +35,7 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `https://xiaofangweibao.jsxinyuansu.com`,//lc
target: `http://192.168.3.12:8080`,//lc
changeOrigin: true,
pathRewrite: {