提交代码

dev_xds
姜玉琦 2024-04-18 01:05:03 +08:00
parent ebfd22a37b
commit cc64d105e1
11 changed files with 242 additions and 12238 deletions

View File

@ -141,7 +141,7 @@
top: 0; top: 0;
width: 51%; width: 51%;
height: 100%; height: 100%;
background: #7171C6; background: #3C68C6;
z-index: 1000; z-index: 1000;
-webkit-transform: translateX(0); -webkit-transform: translateX(0);
-ms-transform: translateX(0); -ms-transform: translateX(0);
@ -226,44 +226,6 @@
display: grid; display: grid;
grid: auto-flow / 1fr 1fr 1fr; grid: auto-flow / 1fr 1fr 1fr;
} }
/*手机*/
@media screen and (max-width:600px) {
body {
background: #191d28 url("http://fileimg.makalu.cc/CORE_40247DD946964A15AA0D4000E1031E19.png") no-repeat bottom/100%;
}
#loader-wrapper .loader-section {
position: fixed;
top: 0;
width: 51%;
height: 100%;
background: transparent;
z-index: 1000;
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0);
}
}
/*平板*/
@media screen and (min-width:600px) and (max-width:960px) {
body {
background: #191d28 url("http://fileimg.makalu.cc/CORE_40247DD946964A15AA0D4000E1031E19.png") no-repeat bottom/100%;
}
#loader-wrapper .loader-section {
position: fixed;
top: 0;
width: 51%;
height: 100%;
background: transparent;
z-index: 1000;
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0);
}
}
</style> </style>
</head> </head>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,45 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=1.0, initial-scale=1.0">
<title>公众号信息网页授权</title>
<script src="./jquery.min.js"></script>
<script src="./jweixin-1.3.2.js"></script>
<script src="./vconsole.min.js"></script>
<script>
var vCon=new VConsole();
</script>
<script>
</script>
</head>
<body>
<div id="app">
{{cnt}}
<button @click="t1">111</button>
</div>
<script src="./vue.min.js"></script>
<script>
var vm= new Vue({
el:"#app",
data(){
return {
cnt:0
}
},
methods:{
t1(){
this.cnt++;
}
},
mounted(){
console.log("--mounted-->")
}
})
</script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@ import { isRelogin } from '@/utils/request'
NProgress.configure({ showSpinner: false }) NProgress.configure({ showSpinner: false })
const whiteList = ['/login', '/register', '/wxAuth'] const whiteList = ['/login', '/register', '/labourComplaint']
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start() NProgress.start()
if (getToken()) { if (getToken()) {

View File

@ -62,8 +62,8 @@ export const constantRoutes = [
hidden: true hidden: true
}, },
{ {
path: '/wxAuth', path: '/labourComplaint',
component: () => import('@/views/wxsetting/wxAuth/index'), component: () => import('@/views/wxsetting/labourComplaint/index'),
hidden: true hidden: true
}, },
{ {

View File

@ -0,0 +1,238 @@
<template>
<div class="app-container">
<el-form ref="form" label-position="top" :model="form" :rules="rules" label-width="180px">
<el-form-item label="投诉人姓名" prop="name">
<el-input v-model="form.name" placeholder="请输入投诉人姓名" />
</el-form-item>
<el-form-item label="投诉人联系电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入投诉人联系电话" />
</el-form-item>
<el-form-item label="投诉人身份证号码" prop="cardId">
<el-input v-model="form.cardId" placeholder="请输入投诉人身份证号码" />
</el-form-item>
<el-form-item label="所属项目名称" prop="projectName">
<el-input v-model="form.projectName" placeholder="请输入所属项目名称" />
</el-form-item>
<el-form-item label="总承包单位" prop="deptName">
<el-input v-model="form.deptName" placeholder="请输入总承包单位" />
</el-form-item>
<el-form-item label="劳务单位名称" prop="subDeptName">
<el-input v-model="form.subDeptName" placeholder="请输入劳务单位名称" />
</el-form-item>
<el-form-item label="欠薪人数" prop="number">
<el-input v-model="form.number" placeholder="请输入欠薪人数" />
</el-form-item>
<el-form-item label="欠薪金额" prop="amount">
<el-input v-model="form.amount" placeholder="请输入欠薪金额" />
</el-form-item>
<el-form-item label="拖欠原因说明" prop="remark">
<el-input type="textarea" rows="3" v-model="form.remark" placeholder="请输入拖欠原因说明" />
</el-form-item>
<el-form-item label="凭证附件" prop="files">
<image-upload v-model="form.files" :limit="9"/>
</el-form-item>
</el-form>
<div style="text-align: center;">
<el-button round icon="el-icon-finished" type="primary" @click="submitForm" style="width:90%;background-color: #409eff;border-color: #409eff;"> </el-button>
</div>
</div>
</template>
<script>
import {
listWxMenConfig,
getWxMenConfig,
delWxMenConfig,
addWxMenConfig,
updateWxMenConfig,
} from "@/api/wxsetting/wxMenConfig";
import { listRole } from "@/api/system/role";
export default {
name: "WxMenConfig",
dicts: ["sys_wechat_menu_type", "sys_common_isdel"],
data() {
return {
//
loading: true,
//
form: {},
//
rules: {
name: [
{ required: true, message: "请选择文件归属", trigger: "blur" }
],
phone:[
{ required: true, message: "请选择子公司", trigger: "blur" }
],
cardId: [
{ required: true, message: "请选择文件归属", trigger: "blur" }
],
projectName:[
{ required: true, message: "请选择子公司", trigger: "blur" }
],
deptName: [
{ required: true, message: "请选择文件归属", trigger: "blur" }
],
subDeptName:[
{ required: true, message: "请选择子公司", trigger: "blur" }
],
number: [
{ required: true, message: "请选择文件归属", trigger: "blur" }
],
amount:[
{ required: true, message: "请选择子公司", trigger: "blur" }
],
remark: [
{ required: true},
{ max: 200,message: "最多输入200字符" }
]
},
};
},
created() {
//this.getList();
//this.getRoles();
},
methods: {
/** 查询菜单配置列表 */
getList() {
this.loading = true;
listWxMenConfig(this.queryParams).then((response) => {
this.wxMenConfigList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 角色列表 */
getRoles() {
listRole({ pageNum: 1, pageSize: 100 }).then((response) => {
this.roles = response.rows;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
menuName: null,
menuIdenti: null,
menuImg: null,
menuUrl: null,
delFlag: null,
createTime: null,
};
this.surMenuConfigRoleList = [];
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加菜单配置";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getWxMenConfig(id).then((response) => {
this.form = response.data;
this.surMenuConfigRoleList = response.data.surMenuConfigRoleList;
this.open = true;
this.title = "修改菜单配置";
});
},
/** 提交按钮 */
submitForm() {
this.$modal.msgWarning("04月20日...敬请期待");
// this.$refs["form"].validate((valid) => {
// if (valid) {
// this.form.surMenuConfigRoleList = this.surMenuConfigRoleList;
// if (this.form.id) {
// updateWxMenConfig(this.form).then((response) => {
// this.$modal.msgSuccess("");
// this.open = false;
// this.getList();
// });
// } else {
// addWxMenConfig(this.form).then((response) => {
// this.$modal.msgSuccess("");
// this.open = false;
// this.getList();
// });
// }
// }
// });
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm('是否确认删除菜单配置编号为"' + ids + '"的数据项?')
.then(function () {
return delWxMenConfig(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 菜单配置角色序号 */
rowSurMenuConfigRoleIndex({ row, rowIndex }) {
row.index = rowIndex + 1;
},
/** 菜单配置角色添加按钮操作 */
handleAddSurMenuConfigRole() {
let obj = {};
obj.roleId = "";
this.surMenuConfigRoleList.push(obj);
},
/** 菜单配置角色删除按钮操作 */
handleDeleteSurMenuConfigRole() {
if (this.checkedSurMenuConfigRole.length == 0) {
this.$modal.msgError("请先选择要删除的菜单配置角色数据");
} else {
const surMenuConfigRoleList = this.surMenuConfigRoleList;
const checkedSurMenuConfigRole = this.checkedSurMenuConfigRole;
this.surMenuConfigRoleList = surMenuConfigRoleList.filter(function (item) {
return checkedSurMenuConfigRole.indexOf(item.index) == -1;
});
}
},
/** 复选框选中数据 */
handleSurMenuConfigRoleSelectionChange(selection) {
this.checkedSurMenuConfigRole = selection.map((item) => item.index);
},
/** 导出按钮操作 */
handleExport() {
this.download(
"wxsetting/wxMenConfig/export",
{
...this.queryParams,
},
`wxMenConfig_${new Date().getTime()}.xlsx`
);
},
},
};
</script>

View File

@ -1,173 +0,0 @@
<template>
<div class="app-content">
<el-row style="padding-top: 150px">
<el-col :sm="24" :lg="24" v-if="successVisible">
<el-result icon="success" title="公众号消息授权成功">
<template slot="extra">
<el-button type="primary" size="medium" round @click="colse"
>返回小程序</el-button
>
</template>
</el-result>
</el-col>
<el-col :sm="24" :lg="24" v-if="errorVisible">
<el-result
icon="error"
title="公众号消息授权失败"
subTitle="请关注公众号并进行网页授权"
>
<template slot="extra">
<el-button type="primary" size="medium" round @click="colse"
>返回小程序</el-button
>
</template>
</el-result>
</el-col>
<el-col :sm="24" :lg="24" v-if="!errorVisible && !successVisible">
<el-result
icon="info"
title="公众号消息授权页面"
>
</el-result>
</el-col>
</el-row>
</div>
</template>
<script>
import Cookies from "js-cookie";
import { wxBinding } from "@/api/wxsetting/wxAuth";
export default {
name: "build",
data() {
return {
userOpenId: "",
errorVisible: false,
successVisible: false,
};
},
created() {
this.userOpenId = this.getQueryString("userOpenId") || "";
console.log("userOpenId...1{}", this.userOpenId);
if (this.userOpenId == "") {
this.userOpenId = Cookies.get("userOpenId") || "";
console.log("userOpenId...2{}", this.userOpenId);
}
if (this.userOpenId == "") {
this.errorVisible = true;
} else {
this.wechatLogin();
}
},
methods: {
wechatLogin() {
//
//let rd = this.getQueryString("rd") || "";
let code = this.getQueryString("code") || "";
let state = this.getQueryString("state") || "";
console.log("code...{}", code, state);
// token === '' && openId != ''
if (code == "" || state == "") {
Cookies.set("userOpenId", this.userOpenId);
console.log("我要去登录了===>");
const hrefUrl = window.location.href;
//
window.location =
"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxe6fd9ad863ac09bf&response_type=code&scope=snsapi_userinfo&redirect_uri=" +
encodeURIComponent(hrefUrl) +
"&state=STATE#wechat_redirect";
} else {
//
this.saveBinding(this.userOpenId, code);
}
},
saveBinding(userOpenId, code) {
if (!userOpenId || !code) {
this.errorVisible = true;
this.successVisible = false;
} else {
/**
* uId 小程序openId
* openId 公众号openId
*/
wxBinding({ openId: userOpenId, code: code })
.then((response) => {
if (response.code == 200) {
this.successVisible = true;
} else {
this.errorVisible = true;
}
})
.catch(() => {
this.errorVisible = true;
this.successVisible = false;
});
}
},
colse() {
// if (typeof WeixinJSBridge == "undefined") {
// if (document.addEventListener) {
// document.addEventListener("WeixinJSBridgeReady", weixin_ClosePage, false);
// } else if (document.attachEvent) {
// document.attachEvent("WeixinJSBridgeReady", weixin_ClosePage);
// document.attachEvent("onWeixinJSBridgeReady", weixin_ClosePage);
// }
// } else {
// WeixinJSBridge.call("closeWindow");
// }
wx.miniProgram.navigateTo({url: '/pages/xiangmugaikuang/index?showUser=true'})
},
weixin_ClosePage() {
//
//WeixinJSBridge.call("closeWindow");
},
getQueryString(paramName) {
console.log("paramName===>", paramName);
if (window.location.href.indexOf("?") == -1) return "";
let searchString = window.location.href.split("?")[1];
let i,
val,
params = searchString.split("&");
console.log("window.params===>", params);
for (i = 0; i < params.length; i++) {
val = params[i].split("=");
if (val[0] == paramName) {
if (val[1] == "undefined" || val[1] == "null") {
return "";
} else {
return val[1];
}
}
}
return "";
},
},
};
</script>
<style scope>
.app-content {
width: 100%;
height: 100%;
background: #191d28
url("https://szgcwx.jhncidg.com/staticFiles/img/CORE_40247DD946964A15AA0D4000E1031E19.png")
no-repeat bottom/100%;
}
.el-result__title p {
color: #ffffff !important;
}
.el-result__subtitle p {
color: #f2777a !important;
font-weight: 800;
}
.el-result__extra {
width: 100%;
}
.el-result__extra button {
width: 100%;
}
.el-result .icon-info{
fill: #409eff !important;
}
</style>