Commit 6a14a35d authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents f7c78315 f9b967a9
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
"china-division": "^2.5.0", "china-division": "^2.5.0",
"clipboard": "^2.0.6", "clipboard": "^2.0.6",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"crypto-js": "^4.1.1",
"date-fns": "^2.14.0", "date-fns": "^2.14.0",
"echarts": "^5.2.2", "echarts": "^5.2.2",
"element-china-area-data": "^5.0.2", "element-china-area-data": "^5.0.2",
......
...@@ -31,16 +31,17 @@ ...@@ -31,16 +31,17 @@
border-bottom: 1px solid rgb(224, 224, 224) !important; border-bottom: 1px solid rgb(224, 224, 224) !important;
} }
.ant-tabs-tab{ .ant-tabs-tab {
font-weight: bold; font-weight: bold;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
i{ i {
color:#1890ff color: #1890ff;
} }
} }
.ant-spin-nested-loading,.ant-spin-container{ .ant-spin-nested-loading,
width:100%; .ant-spin-container {
height:100%; width: 100%;
height: 100%;
} }
/* 溢出表格滚动条 */ /* 溢出表格滚动条 */
/* 表格 */ /* 表格 */
...@@ -56,10 +57,9 @@ ...@@ -56,10 +57,9 @@
tr:only-child > th:last-child { tr:only-child > th:last-child {
border-right-color: #f0f0f0 !important; border-right-color: #f0f0f0 !important;
} }
} }
.ant-table-placeholder{ .ant-table-placeholder {
width:calc(100% - 6px) width: calc(100% - 6px);
} }
.ant-table-header { .ant-table-header {
background: #fff; background: #fff;
...@@ -118,4 +118,11 @@ ...@@ -118,4 +118,11 @@
// align-items: center; // align-items: center;
// justify-content:space-between; // justify-content:space-between;
// margin-bottom: 20px; // margin-bottom: 20px;
// } // }
\ No newline at end of file
// 统一设置表格为空时的展示
.ant-table-tbody {
td:empty::after {
content: "--";
}
}
...@@ -2,13 +2,16 @@ ...@@ -2,13 +2,16 @@
<div style="margin-bottom: 25px" class="y-quill" :style="{ height: height }"> <div style="margin-bottom: 25px" class="y-quill" :style="{ height: height }">
<!-- 图片上传组件辅助--> <!-- 图片上传组件辅助-->
<a-upload <a-upload
name="uploadFile" name="file"
:multiple="true" :multiple="true"
:headers="headers" :headers="{
Authorization: token,
}"
:show-upload-list="false" :show-upload-list="false"
:action="serverUrl" :action="serverUrl"
@change="handleChange" @change="handleChange"
:before-upload="beforeUpload" :before-upload="beforeUpload"
:accept="accept"
> >
</a-upload> </a-upload>
<!-- 富文本 --> <!-- 富文本 -->
...@@ -24,7 +27,7 @@ ...@@ -24,7 +27,7 @@
</div> </div>
</template> </template>
<script> <script>
import local from "@/utils/local"; import { mapGetters } from "vuex";
// 工具栏配置 // 工具栏配置
const toolbarOptions = [ const toolbarOptions = [
["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线 ["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线
...@@ -104,6 +107,7 @@ export default { ...@@ -104,6 +107,7 @@ export default {
data() { data() {
return { return {
accept: "image/png,image/gif,image/jpeg,video/mp4",
quillUpdateImg: false, // 根据图片上传状态来确定是否显示loading动画,刚开始是false,不显示 quillUpdateImg: false, // 根据图片上传状态来确定是否显示loading动画,刚开始是false,不显示
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
editorOption: { editorOption: {
...@@ -142,10 +146,7 @@ export default { ...@@ -142,10 +146,7 @@ export default {
}, },
}, },
}, },
serverUrl: process.env.VUE_APP_API_BASE_URL + "/file/commonupload", // 这里写你要上传的图片服务器地址 serverUrl: process.env.VUE_APP_API_BASE_URL + "/base/file/commonupload", // 这里写你要上传的图片服务器地址
headers: {
Authorization: local.getLocal("token"),
},
}; };
}, },
computed: { computed: {
...@@ -157,6 +158,7 @@ export default { ...@@ -157,6 +158,7 @@ export default {
this.$emit("input", val); this.$emit("input", val);
}, },
}, },
...mapGetters("site", ["token"]),
}, },
methods: { methods: {
onEditorBlur() { onEditorBlur() {
......
...@@ -5,8 +5,7 @@ ...@@ -5,8 +5,7 @@
<div class="flex aic"> <div class="flex aic">
<router-link to="/" class="flex aic"> <router-link to="/" class="flex aic">
<img <img
class="mr10" class="mr10 logo"
width="32"
:src="sysLogo ? api + sysLogo : require('@/assets/img/logo.png')" :src="sysLogo ? api + sysLogo : require('@/assets/img/logo.png')"
/> />
<h1 class="title"> <h1 class="title">
...@@ -102,6 +101,10 @@ export default { ...@@ -102,6 +101,10 @@ export default {
line-height: normal; line-height: normal;
} }
} }
.logo {
height: 32px;
object-fit: contain;
}
.main { .main {
height: calc(100vh - 64px); height: calc(100vh - 64px);
padding: 0px 24px 24px; padding: 0px 24px 24px;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
:wrapper-col="{ span: 22 }" :wrapper-col="{ span: 22 }"
> >
<a-form-model-item label="应用主题"> <a-form-model-item label="应用主题">
{{ filterItems(appInfo.appThemeName, appDict.appThemeName) }} {{ filterItems(appInfo.appThemeName) }}
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="应用简介"> <a-form-model-item label="应用简介">
{{ appInfo.summary }} {{ appInfo.summary }}
...@@ -117,10 +117,10 @@ import { ...@@ -117,10 +117,10 @@ import {
getVersionList, getVersionList,
usedVersion, usedVersion,
previewVersion, previewVersion,
getCategoryList,
} from "@/services/market"; } from "@/services/market";
import CheckSite from "../modal/CheckSite.vue"; import CheckSite from "../modal/CheckSite.vue";
import { pageSizeOptions } from "@/config/pageConfig.js"; import { pageSizeOptions } from "@/config/pageConfig.js";
import { filterItems } from "@/utils";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
export default { export default {
props: { props: {
...@@ -153,9 +153,7 @@ export default { ...@@ -153,9 +153,7 @@ export default {
{ {
title: "更新说明", title: "更新说明",
width: "40%", width: "40%",
customRender: (text) => { dataIndex: "notes",
return <span>{text.notes ? text.notes : "--"}</span>;
},
}, },
{ {
title: "应用包", title: "应用包",
...@@ -172,7 +170,6 @@ export default { ...@@ -172,7 +170,6 @@ export default {
}, },
]; ];
return { return {
filterItems,
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
columns, columns,
appId: this.$route.query.id, appId: this.$route.query.id,
...@@ -185,16 +182,30 @@ export default { ...@@ -185,16 +182,30 @@ export default {
form: {}, form: {},
tableData: [], tableData: [],
siteVisible: false, siteVisible: false,
categoryList: [],
}; };
}, },
computed: { computed: {
...mapGetters("site", ["appDict"]), ...mapGetters("site", ["appDict"]),
}, },
created() { created() {
this.getCategoryList();
this.getAppInfo(); this.getAppInfo();
this.getVersions(); this.getVersions();
}, },
methods: { methods: {
// 获取分类列表
async getCategoryList() {
let res = await getCategoryList({
page: 1,
size: -1,
siteId: this.siteId,
});
let { data } = res.data.data;
if (res.data.code === 1) {
this.categoryList = data;
}
},
// 获取应用详情 // 获取应用详情
async getAppInfo() { async getAppInfo() {
let res = await getAppInfo({ id: this.appId }); let res = await getAppInfo({ id: this.appId });
...@@ -275,6 +286,12 @@ export default { ...@@ -275,6 +286,12 @@ export default {
this.$refs.CheckSite.getSiteList(siteList); this.$refs.CheckSite.getSiteList(siteList);
this.siteVisible = true; this.siteVisible = true;
}, },
filterItems(appThemeName) {
return (
this.categoryList.find((v) => v.id == appThemeName)?.categoryName ||
"--"
);
},
}, },
}; };
</script> </script>
......
...@@ -213,7 +213,6 @@ export default { ...@@ -213,7 +213,6 @@ export default {
...mapMutations("site", ["SET_appDict"]), ...mapMutations("site", ["SET_appDict"]),
// 获取分类列表 // 获取分类列表
async getCategoryList() { async getCategoryList() {
this.loading = true;
let res = await getCategoryList({ let res = await getCategoryList({
page: 1, page: 1,
size: -1, size: -1,
......
...@@ -83,6 +83,32 @@ ...@@ -83,6 +83,32 @@
:placeholder="`请选择${v.fieldName}`" :placeholder="`请选择${v.fieldName}`"
valueFormat="YYYY-MM-DD" valueFormat="YYYY-MM-DD"
/> />
<!-- 年选择器 -->
<a-date-picker
mode="year"
v-else-if="v.fieldType == 'year'"
v-model="v.fieldValue"
:placeholder="`请选择${v.fieldName}`"
valueFormat="YYYY"
format="YYYY"
:open="isopen"
@openChange="handYearChange"
@panelChange="(value) => panelYearChange(value, v)"
/>
<!-- 月选择器 -->
<a-month-picker
v-else-if="v.fieldType == 'month'"
v-model="v.fieldValue"
:placeholder="`请选择${v.fieldName}`"
valueFormat="M"
/>
<!-- 周选择器 -->
<a-week-picker
v-else-if="v.fieldType == 'week'"
v-model="v.fieldValue"
:placeholder="`请选择${v.fieldName}`"
valueFormat="YYYY-WW"
/>
<!-- 多行文本输入框 --> <!-- 多行文本输入框 -->
<a-textarea <a-textarea
v-else-if="v.fieldType == 'textarea'" v-else-if="v.fieldType == 'textarea'"
...@@ -170,6 +196,8 @@ export default { ...@@ -170,6 +196,8 @@ export default {
appId: "", appId: "",
appInfoFieldList: [], appInfoFieldList: [],
}, },
isopen: false,
year: null,
}; };
}, },
computed: { computed: {
...@@ -269,6 +297,17 @@ export default { ...@@ -269,6 +297,17 @@ export default {
changeCheckBox(vals, row) { changeCheckBox(vals, row) {
row.fieldValue = vals.join(","); row.fieldValue = vals.join(",");
}, },
handYearChange(open) {
if (open) {
this.isopen = true;
} else {
this.isopen = false;
}
},
panelYearChange(value, row) {
row.fieldValue = this.$moment(value).format("YYYY");
this.isopen = false;
},
}, },
}; };
</script> </script>
...@@ -289,20 +328,6 @@ export default { ...@@ -289,20 +328,6 @@ export default {
padding: 24px; padding: 24px;
flex: 1; flex: 1;
overflow-y: auto; overflow-y: auto;
&::-webkit-scrollbar {
width: 12px;
overflow-y: auto;
}
&::-webkit-scrollbar-thumb {
border-radius: 6px;
background-color: rgba(144, 147, 153, 0.5);
}
&::-webkit-scrollbar-track {
border-radius: 6px;
background: #fff;
}
} }
.content { .content {
align-items: flex-start !important; align-items: flex-start !important;
......
...@@ -98,6 +98,19 @@ const fieldTypeItem = [ ...@@ -98,6 +98,19 @@ const fieldTypeItem = [
value: "date", value: "date",
label: "日期选择框", label: "日期选择框",
}, },
{
value: "year",
label: "年选择框",
},
{
value: "month",
label: "月选择框",
},
{
value: "week",
label: "周选择框",
},
{ {
value: "radio", value: "radio",
label: "单选框", label: "单选框",
......
...@@ -13,23 +13,42 @@ ...@@ -13,23 +13,42 @@
:class="{ active: i === isActive }" :class="{ active: i === isActive }"
v-for="(v, i) in productList" v-for="(v, i) in productList"
:key="v.id" :key="v.id"
@click="changeMenu(i, v)" @click.self="changeMenu(i, v)"
style="width: 50%; text-align: center" style="width: 50%; text-align: center"
> >
<div class="control" v-permission="[1]">
<a-space>
<a-icon type="edit" @click="handleEdit(v)" />
<a-icon type="delete" @click="handleDel(v.id)" />
</a-space>
</div>
{{ v.productName }} {{ v.productName }}
</a-card-grid> </a-card-grid>
</div> </div>
<!-- 编辑产品 -->
<AddDev
ref="AddDev"
:visible.sync="visible"
:title="title"
@addDev="getProductList"
></AddDev>
</div> </div>
</template> </template>
<script> <script>
import { getProductList } from "@/services/surface"; import { getProductList, deleteProduct } from "@/services/surface";
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import AddDev from "../modal/AddDev.vue";
export default { export default {
components: {
AddDev,
},
data() { data() {
return { return {
productList: [], //产品列表 productList: [], //产品列表
isActive: "", isActive: "",
visible: false,
title: "编辑产品",
}; };
}, },
created() { created() {
...@@ -62,6 +81,38 @@ export default { ...@@ -62,6 +81,38 @@ export default {
}; };
this.SET_curProduct(obj); this.SET_curProduct(obj);
}, },
// 编辑产品
handleEdit(row) {
this.title = "编辑产品";
this.$refs.AddDev.onEdit(row);
this.visible = true;
},
// 删除产品
handleDel(id) {
let _this = this;
_this.$confirm({
title: "系统提示",
content: "删除不可恢复,确定要删除吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
icon: "exclamation-circle",
maskClosable: true,
async onOk() {
let res = await deleteProduct({ id });
let { code, msg } = res.data;
if (code === 1) {
_this.$message.success(msg);
_this.getProductList();
}
},
onCancel() {
console.log("Cancel");
},
});
console.log(id);
},
}, },
beforeDestroy() { beforeDestroy() {
this.SET_curProduct({}); this.SET_curProduct({});
...@@ -74,6 +125,7 @@ export default { ...@@ -74,6 +125,7 @@ export default {
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
} }
.search-box { .search-box {
padding: 15px 15px 0px; padding: 15px 15px 0px;
} }
...@@ -85,6 +137,9 @@ export default { ...@@ -85,6 +137,9 @@ export default {
.active { .active {
background-color: #1890ff; background-color: #1890ff;
color: #fff; color: #fff;
.anticon {
color: inherit;
}
} }
} }
/deep/.ant-card-grid { /deep/.ant-card-grid {
...@@ -93,5 +148,23 @@ export default { ...@@ -93,5 +148,23 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
cursor: pointer; cursor: pointer;
position: relative;
&:hover {
.control {
display: block;
}
}
}
.control {
position: absolute;
right: 10px;
top: 0px;
display: none;
.anticon-edit {
color: #03d76f;
}
.anticon-delete {
color: #fa4d4c;
}
} }
</style> </style>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div> <div>
<a-modal <a-modal
v-model="Visible" v-model="Visible"
title="新增设备" :title="title"
@ok="handleOk" @ok="handleOk"
@cancel="handleClose" @cancel="handleClose"
> >
...@@ -17,11 +17,7 @@ ...@@ -17,11 +17,7 @@
<a-input placeholder="请输入设备名称" v-model="form.productName" /> <a-input placeholder="请输入设备名称" v-model="form.productName" />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="设备编号" prop="productCode"> <a-form-model-item label="设备编号" prop="productCode">
<a-input <a-input placeholder="请输入设备编号" v-model="form.productCode" />
type="password"
placeholder="请输入设备编号"
v-model="form.productCode"
/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="备注" prop="productRemark"> <a-form-model-item label="备注" prop="productRemark">
<a-textarea <a-textarea
...@@ -44,6 +40,11 @@ export default { ...@@ -44,6 +40,11 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
title: {
required: true,
type: String,
default: "新增设备",
},
}, },
data() { data() {
return { return {
...@@ -88,9 +89,18 @@ export default { ...@@ -88,9 +89,18 @@ export default {
}, },
// 关闭对话框 // 关闭对话框
handleClose() { handleClose() {
this.$refs.form.resetFields(); this.$refs.form.clearValidate();
this.Visible = false; this.Visible = false;
}, },
// 新增
onAdd() {
Object.assign(this.form, this.$options.data().form);
this.form.id && this.$delete(this.form, "id");
},
// 编辑
onEdit(row) {
this.form = { ...row };
},
}, },
}; };
</script> </script>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<TabHeader label="皮肤管理"> <TabHeader label="皮肤管理">
<a-space> <a-space>
<a-button v-permission="[1]" icon="plus" @click="addDev" <a-button v-permission="[1]" icon="plus" @click="addDev"
>新增设备</a-button >新增产品</a-button
> >
<a-button <a-button
type="primary" type="primary"
...@@ -48,7 +48,12 @@ ...@@ -48,7 +48,12 @@
@addSkinSuccess="addSkinSuccess" @addSkinSuccess="addSkinSuccess"
></AddSurface> ></AddSurface>
<!-- 新增设备 --> <!-- 新增设备 -->
<AddDev :visible.sync="addDevVisible" @addDev="addDevSuccess"></AddDev> <AddDev
ref="AddDev"
:visible.sync="addDevVisible"
@addDev="addDevSuccess"
:title="title"
></AddDev>
</div> </div>
</template> </template>
...@@ -77,6 +82,7 @@ export default { ...@@ -77,6 +82,7 @@ export default {
visible: false, visible: false,
addDevVisible: false, addDevVisible: false,
classifyList: [], //皮肤分类数据 classifyList: [], //皮肤分类数据
title: "新增产品",
}; };
}, },
created() { created() {
...@@ -113,8 +119,8 @@ export default { ...@@ -113,8 +119,8 @@ export default {
}, },
// 编辑皮肤 // 编辑皮肤
editSkin(row) { editSkin(row) {
this.isShow = true;
this.$refs.AddSurface.onEdit(row); this.$refs.AddSurface.onEdit(row);
this.isShow = true;
}, },
// 新增分类成功刷新数据 // 新增分类成功刷新数据
addCategorySuccess() { addCategorySuccess() {
...@@ -126,6 +132,8 @@ export default { ...@@ -126,6 +132,8 @@ export default {
}, },
// 新增设备 // 新增设备
addDev() { addDev() {
this.title = "新增产品";
this.$refs.AddDev.onAdd();
this.addDevVisible = true; this.addDevVisible = true;
}, },
// 新增设备成功 // 新增设备成功
......
...@@ -2,8 +2,9 @@ import Vue from "vue"; ...@@ -2,8 +2,9 @@ import Vue from "vue";
import Vuex from "vuex"; import Vuex from "vuex";
import modules from "./modules"; import modules from "./modules";
import createPersistedState from "vuex-persistedstate"; import createPersistedState from "vuex-persistedstate";
import SecureLS from "secure-ls"; // import SecureLS from "secure-ls";
var ls = new SecureLS({ isCompression: false }); // var ls = new SecureLS({ isCompression: false });
import { SessionCrypto } from "@/utils/util";
Vue.use(Vuex); Vue.use(Vuex);
const store = new Vuex.Store({ const store = new Vuex.Store({
modules, modules,
...@@ -15,9 +16,9 @@ const store = new Vuex.Store({ ...@@ -15,9 +16,9 @@ const store = new Vuex.Store({
createPersistedState({ createPersistedState({
key: "info", key: "info",
storage: { storage: {
getItem: (key) => ls.get(key), getItem: (key) => SessionCrypto.getItem(key),
setItem: (key, value) => ls.set(key, value), setItem: (key, value) => SessionCrypto.setItem(key, value),
removeItem: (key) => ls.remove(key), removeItem: (key) => SessionCrypto.remove(key),
}, },
}), }),
], ],
......
import enquireJs from "enquire.js"; import enquireJs from "enquire.js";
import CryptoJS from "crypto-js";
export function isDef(v) { export function isDef(v) {
return v !== undefined && v !== null; return v !== undefined && v !== null;
} }
...@@ -62,3 +62,52 @@ export const extractTree = (arrs, childs, attrArr) => { ...@@ -62,3 +62,52 @@ export const extractTree = (arrs, childs, attrArr) => {
}; };
return getObj(arrs); return getObj(arrs);
}; };
/**
* 加密存储临时数据并解析对象
*/
const aseKey = "**_FXxx_1234_KEY";
const KEY = "KEY_EXTRA";
export class SessionCrypto {
// 加密
static setItem(key = KEY, value = "") {
if (typeof key === "string") {
const stringify = JSON.stringify(value);
const encrypt = CryptoJS.AES.encrypt(
stringify,
CryptoJS.enc.Utf8.parse(aseKey),
{
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7,
}
).toString();
window.sessionStorage.setItem(key, encrypt);
return encrypt;
}
}
// 解密
static getItem(key = KEY) {
const ssStr = window.sessionStorage.getItem(key) || "";
try {
if (ssStr) {
const decrypt = CryptoJS.AES.decrypt(
ssStr,
CryptoJS.enc.Utf8.parse(aseKey),
{
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7,
}
).toString(CryptoJS.enc.Utf8);
const parseStr = JSON.parse(decrypt);
return parseStr;
}
return "";
} catch (e) {
return "";
}
}
// 删除
static remove(key) {
window.sessionStorage.removeItem(key);
}
}
...@@ -3676,6 +3676,11 @@ crypto-js@^3.1.6: ...@@ -3676,6 +3676,11 @@ crypto-js@^3.1.6:
resolved "https://registry.npmmirror.com/crypto-js/-/crypto-js-3.3.0.tgz#846dd1cce2f68aacfa156c8578f926a609b7976b" resolved "https://registry.npmmirror.com/crypto-js/-/crypto-js-3.3.0.tgz#846dd1cce2f68aacfa156c8578f926a609b7976b"
integrity sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q== integrity sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==
crypto-js@^4.1.1:
version "4.1.1"
resolved "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.1.1.tgz#9e485bcf03521041bd85844786b83fb7619736cf"
integrity sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==
crypto-random-string@^2.0.0: crypto-random-string@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.npm.taobao.org/crypto-random-string/download/crypto-random-string-2.0.0.tgz?cache=0&sync_timestamp=1583560482221&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcrypto-random-string%2Fdownload%2Fcrypto-random-string-2.0.0.tgz" resolved "https://registry.npm.taobao.org/crypto-random-string/download/crypto-random-string-2.0.0.tgz?cache=0&sync_timestamp=1583560482221&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcrypto-random-string%2Fdownload%2Fcrypto-random-string-2.0.0.tgz"
......
...@@ -69,4 +69,7 @@ export default { ...@@ -69,4 +69,7 @@ export default {
.ant-calendar-next-year-btn::after { .ant-calendar-next-year-btn::after {
border-color: rgba(0, 0, 0, 1) !important; border-color: rgba(0, 0, 0, 1) !important;
} }
.ant-progress-text {
color: #fff !important;
}
</style> </style>
\ No newline at end of file
...@@ -776,4 +776,11 @@ img { ...@@ -776,4 +776,11 @@ img {
// } // }
// } // }
// } // }
// } // }
\ No newline at end of file
// 统一设置表格为空时的展示
.ant-table-tbody {
td:empty::after {
content: "--";
}
}
\ No newline at end of file
<template>
<div id="indexLizi" class="particle-wavy"></div>
</template>
<script>
import * as THREE from "three";
export default {
name: "Pointwave",
props: {
amountX: {
type: Number,
default: 50,
},
amountY: {
type: Number,
default: 50,
},
color: {
type: String,
default: "#10cbff",
},
top: {
type: Number,
default: 350,
},
},
data() {
return {
count: 0,
// 用来跟踪鼠标水平位置
mouseX: 0,
windowHalfX: null,
// 相机
camera: null,
// 场景
scene: null,
// 批量管理粒子
particles: null,
// 渲染器
renderer: null,
};
},
mounted() {
this.init();
this.animate();
},
methods: {
init() {
const SEPARATION = 100;
const SCREEN_WIDTH = window.innerWidth;
const SCREEN_HEIGHT = window.innerHeight;
const container = document.createElement("div");
this.windowHalfX = window.innerWidth / 2;
container.style.position = "relative";
container.style.top = `${this.top}px`;
container.style.height = `${SCREEN_HEIGHT - this.top}px`;
document.getElementById("indexLizi").appendChild(container);
this.camera = new THREE.PerspectiveCamera(
75,
SCREEN_WIDTH / SCREEN_HEIGHT,
1,
10000
);
this.camera.position.z = 1000;
this.scene = new THREE.Scene();
const numParticles = this.amountX * this.amountY;
const positions = new Float32Array(numParticles * 3);
const scales = new Float32Array(numParticles);
// 初始化粒子位置和大小
let i = 0;
let j = 0;
for (let ix = 0; ix < this.amountX; ix++) {
for (let iy = 0; iy < this.amountY; iy++) {
positions[i] = ix * SEPARATION - (this.amountX * SEPARATION) / 2;
positions[i + 1] = 0;
positions[i + 2] = iy * SEPARATION - (this.amountY * SEPARATION) / 2;
scales[j] = 1;
i += 3;
j++;
}
}
const geometry = new THREE.BufferGeometry();
geometry.setAttribute(
"position",
new THREE.BufferAttribute(positions, 3)
);
geometry.setAttribute("scale", new THREE.BufferAttribute(scales, 1));
// 初始化粒子材质
const material = new THREE.ShaderMaterial({
uniforms: {
color: { value: new THREE.Color(this.color) },
},
vertexShader: `
attribute float scale;
void main() {
vec4 mvPosition = modelViewMatrix * vec4( position, 2.0 );
gl_PointSize = scale * ( 300.0 / - mvPosition.z );
gl_Position = projectionMatrix * mvPosition;
}
`,
fragmentShader: `
uniform vec3 color;
void main() {
if ( length( gl_PointCoord - vec2( 0.5, 0.5 ) ) > 0.475 ) discard;
gl_FragColor = vec4( color, 1.0 );
}
`,
});
this.particles = new THREE.Points(geometry, material);
this.scene.add(this.particles);
this.renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
this.renderer.setSize(container.clientWidth, container.clientHeight);
this.renderer.setPixelRatio(window.devicePixelRatio);
this.renderer.setClearAlpha(0);
container.appendChild(this.renderer.domElement);
window.addEventListener("resize", this.onWindowResize, {
passive: false,
});
document.addEventListener("mousemove", this.onDocumentMouseMove, {
passive: false,
});
document.addEventListener("touchstart", this.onDocumentTouchStart, {
passive: false,
});
document.addEventListener("touchmove", this.onDocumentTouchMove, {
passive: false,
});
},
render() {
this.camera.position.x += (this.mouseX - this.camera.position.x) * 0.05;
this.camera.position.y = 400;
this.camera.lookAt(this.scene.position);
const positions = this.particles.geometry.attributes.position.array;
const scales = this.particles.geometry.attributes.scale.array;
// 计算粒子位置及大小
let i = 0;
let j = 0;
for (let ix = 0; ix < this.amountX; ix++) {
for (let iy = 0; iy < this.amountY; iy++) {
positions[i + 1] =
Math.sin((ix + this.count) * 0.3) * 100 +
Math.sin((iy + this.count) * 0.5) * 100;
scales[j] =
(Math.sin((ix + this.count) * 0.3) + 1) * 8 +
(Math.sin((iy + this.count) * 0.5) + 1) * 8;
i += 3;
j++;
}
}
// 重新渲染粒子
this.particles.geometry.attributes.position.needsUpdate = true;
this.particles.geometry.attributes.scale.needsUpdate = true;
this.renderer.render(this.scene, this.camera);
this.count += 0.02;
},
animate() {
requestAnimationFrame(this.animate);
this.render();
// setInterval(() => {
// }, 50);
},
onDocumentMouseMove(event) {
this.mouseX = event.clientX - this.windowHalfX;
},
onDocumentTouchStart(event) {
if (event.touches.length === 1) {
this.mouseX = event.touches[0].pageX - this.windowHalfX;
}
},
onDocumentTouchMove(event) {
if (event.touches.length === 1) {
event.preventDefault();
this.mouseX = event.touches[0].pageX - this.windowHalfX;
}
},
onWindowResize() {
this.windowHalfX = window.innerWidth / 2;
this.camera.aspect = window.innerWidth / window.innerHeight;
this.camera.updateProjectionMatrix();
this.renderer.setSize(window.innerWidth, window.innerHeight);
},
},
};
</script>
<style lang="less" scoped>
.particle-wavy {
width: 100%;
height: 100%;
opacity: 0.3;
}
</style>
\ No newline at end of file
...@@ -2,9 +2,10 @@ import Vue from "vue"; ...@@ -2,9 +2,10 @@ import Vue from "vue";
import Vuex from "vuex"; import Vuex from "vuex";
import modules from "./modules"; import modules from "./modules";
import createPersistedState from "vuex-persistedstate"; import createPersistedState from "vuex-persistedstate";
import SecureLS from "secure-ls"; // import SecureLS from "secure-ls";
var ls = new SecureLS({ isCompression: false }); // var ls = new SecureLS({ isCompression: false });
import VuexReset from "@ianwalter/vuex-reset"; import VuexReset from "@ianwalter/vuex-reset";
import { SessionCrypto } from "@/utils";
// import persistedState from 'vuex-persistedstate' // import persistedState from 'vuex-persistedstate'
Vue.use(Vuex); Vue.use(Vuex);
const store = new Vuex.Store({ const store = new Vuex.Store({
...@@ -16,9 +17,9 @@ const store = new Vuex.Store({ ...@@ -16,9 +17,9 @@ const store = new Vuex.Store({
createPersistedState({ createPersistedState({
key: "info", key: "info",
storage: { storage: {
getItem: (key) => ls.get(key), getItem: (key) => SessionCrypto.getItem(key),
setItem: (key, value) => ls.set(key, value), setItem: (key, value) => SessionCrypto.setItem(key, value),
removeItem: (key) => ls.remove(key), removeItem: (key) => SessionCrypto.remove(key),
}, },
}), }),
], ],
......
...@@ -16,3 +16,66 @@ export let encrypt = (str, keyStr, ivStr) => { ...@@ -16,3 +16,66 @@ export let encrypt = (str, keyStr, ivStr) => {
return encrypted.toString(); return encrypted.toString();
}; };
// 解密
export const decrypt = (word, keyStr, ivStr) => {
keyStr = keyStr ? keyStr : "0000000671595991";
ivStr = ivStr ? ivStr : "tdrdadq59tbss5n7";
let key = CryptoJS.enc.Utf8.parse(keyStr);
let iv = CryptoJS.enc.Utf8.parse(ivStr);
let decrypt = CryptoJS.AES.decrypt(word, key, {
iv,
mode: CryptoJS.mode.CBC,
padding: CryptoJS.pad.Pkcs7,
});
return decrypt.toString(CryptoJS.enc.Utf8);
};
/**
* 加密存储临时数据并解析对象
*/
const aseKey = "**_FXxx_1234_KEY";
const KEY = "KEY_EXTRA";
export class SessionCrypto {
// 加密
static setItem(key = KEY, value = "") {
if (typeof key === "string") {
const stringify = JSON.stringify(value);
const encrypt = CryptoJS.AES.encrypt(
stringify,
CryptoJS.enc.Utf8.parse(aseKey),
{
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7,
}
).toString();
window.sessionStorage.setItem(key, encrypt);
return encrypt;
}
}
// 解密
static getItem(key = KEY) {
const ssStr = window.sessionStorage.getItem(key) || "";
try {
if (ssStr) {
const decrypt = CryptoJS.AES.decrypt(
ssStr,
CryptoJS.enc.Utf8.parse(aseKey),
{
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7,
}
).toString(CryptoJS.enc.Utf8);
const parseStr = JSON.parse(decrypt);
return parseStr;
}
return "";
} catch (e) {
return "";
}
}
// 删除
static remove(key) {
window.sessionStorage.removeItem(key);
}
}
...@@ -158,7 +158,7 @@ export default { ...@@ -158,7 +158,7 @@ export default {
this.particles.geometry.attributes.position.needsUpdate = true; this.particles.geometry.attributes.position.needsUpdate = true;
this.particles.geometry.attributes.scale.needsUpdate = true; this.particles.geometry.attributes.scale.needsUpdate = true;
this.renderer.render(this.scene, this.camera); this.renderer.render(this.scene, this.camera);
this.count += 0.1; this.count += 0.02;
}, },
animate() { animate() {
requestAnimationFrame(this.animate); requestAnimationFrame(this.animate);
......
<template> <template>
<!-- 路径分析 --> <!-- 路径分析 -->
<div class="page"> <div class="page">
<a-form-model :model="queryform" :label-col="labelCol" :wrapper-col="wrapperCol" layout="inline"> <a-form-model
<a-form-model-item> :model="queryform"
<a-select v-model="queryform.productId" style="width: 200px" placeholder="选择产品"> :label-col="labelCol"
<a-select-option :value="item.id" v-for="(item,index) in product" :key="index"> :wrapper-col="wrapperCol"
{{item.title}} layout="inline"
</a-select-option> >
</a-select> <a-form-model-item>
</a-form-model-item> <a-select
<a-form-model-item> v-model="queryform.productId"
<a-range-picker valueFormat="yyyy-MM-DD" v-model="time" style="width: 300px" :allowClear="false"/> style="width: 200px"
</a-form-model-item> placeholder="选择产品"
<a-form-model-item> >
<a-button type="primary" class="addclass" @click="getData"> <a-select-option
开始分析 :value="item.id"
</a-button> v-for="(item, index) in product"
</a-form-model-item> :key="index"
</a-form-model> >
<div id="path"></div> {{ item.title }}
</div> </a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item>
<a-range-picker
valueFormat="yyyy-MM-DD"
v-model="time"
style="width: 300px"
:allowClear="false"
/>
</a-form-model-item>
<a-form-model-item>
<a-button type="primary" class="addclass" @click="getData">
开始分析
</a-button>
</a-form-model-item>
</a-form-model>
<div id="path"></div>
</div>
</template> </template>
<script> <script>
import * as echarts from 'echarts' import * as echarts from "echarts";
import product from "../mixins/product" import product from "../mixins/product";
import {getWayAccessAnalyse} from '@/api/dataActuary.js' import { getWayAccessAnalyse } from "@/api/dataActuary.js";
import moment from 'moment'; import moment from "moment";
export default { export default {
mixins:[product], mixins: [product],
data() { data() {
return { return {
queryform: { queryform: {
productId: 1, productId: 1,
dateTimeStart:moment().format('yyyy-MM-DD'), dateTimeStart: moment().format("yyyy-MM-DD"),
dateTimeEnd:moment().format('yyyy-MM-DD') dateTimeEnd: moment().format("yyyy-MM-DD"),
}, },
time:[moment().format('yyyy-MM-DD'),moment().format('yyyy-MM-DD')], time: [moment().format("yyyy-MM-DD"), moment().format("yyyy-MM-DD")],
product:[{ product: [
title:'排队机', {
id:1 title: "排队机",
}], id: 1,
labelCol: { },
span: 1 ],
}, labelCol: {
wrapperCol: { span: 1,
span: 14 },
}, wrapperCol: {
} span: 14,
}, },
mounted() { myChart: null,
this.getData() };
}, },
methods: { created() {
getData() { this.$nextTick(() => {
this.queryform.dateTimeStart = this.time ? this.time[0] : null this.getData();
this.queryform.dateTimeStart = this.time ? this.time[1] : null });
getWayAccessAnalyse(this.queryform).then(res=>{ },
let data = res.data.data.map(item=>({name:item.name})) methods: {
let links = res.data.links.map(item=>({ getData() {
source:item.sourceName, this.queryform.dateTimeStart = this.time ? this.time[0] : null;
target:item.targetName, this.queryform.dateTimeStart = this.time ? this.time[1] : null;
value:item.value, getWayAccessAnalyse(this.queryform).then((res) => {
lineStyle:{ let newobj = {};
color:'source' let data = res.data.data.reduce((preVal, curVal) => {
} newobj[curVal.name]
})) ? ""
this.init(data,links) : (newobj[curVal.name] = preVal.push(curVal));
}) return preVal;
}, }, []);
uniqueFunc(arr, uniId){ // let data = res.data.data.map((item, i) =>
const res = new Map(); // item.code != "/sceneSignIn"
return arr.filter((item) => !res.has(item[uniId]) && res.set(item[uniId], 1)); // ? {
}, // name: item.name,
init(data,links) { // }
let chartDom = document.getElementById('path') // : ""
let myChart = echarts.init(chartDom); // );
myChart.setOption({ let links = res.data.links.map((item) => ({
series: { source: item.sourceName,
type: 'sankey', target: item.targetName,
layout: 'none', value: item.value,
emphasis: { lineStyle: {
focus: 'adjacency' color: "source",
}, },
color:['#FFCAC4','#6D86DE','#409AFE','#4DB3EA','#07CF8C'], }));
nodeWidth:10, data = data.filter((v) => v);
data: data, links = links.filter((v) => v.target != "首页" && v.target != v.source);
links: links this.init(data, links);
} });
}) },
} uniqueFunc(arr, uniId) {
} const res = new Map();
}; return arr.filter(
(item) => !res.has(item[uniId]) && res.set(item[uniId], 1)
);
},
init(data, links) {
if (
this.myChart != null &&
this.myChart != "" &&
this.myChart != undefined
) {
this.myChart.dispose(); //销毁
}
this.myChart = echarts.init(document.getElementById("path"));
this.myChart.setOption({
series: {
type: "sankey",
layout: "none",
emphasis: {
focus: "adjacency",
},
color: ["#FFCAC4", "#6D86DE", "#409AFE", "#4DB3EA", "#07CF8C"],
nodeWidth: 10,
data: data,
links: links,
},
});
window.addEventListener("resize", () => {
if (this.myChart) {
this.myChart.resize();
}
});
},
},
};
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.page{ .page {
height: calc(100% - 50px); height: calc(100% - 50px);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
/deep/.ant-form { /deep/.ant-form {
padding: 15px; padding: 15px;
} }
#path{ #path {
flex: 1; flex: 1;
width: 70%; width: 70%;
margin: 0 auto; margin: 0 auto;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -217,12 +217,14 @@ export default { ...@@ -217,12 +217,14 @@ export default {
display: flex; display: flex;
.img-dv { .img-dv {
width: 60%; flex: 1;
margin: 100px; margin: 100px;
height: 600px;
position: relative; position: relative;
img { img {
width: 100%; width: 100%;
height: 100%;
} }
#queuing { #queuing {
...@@ -236,7 +238,7 @@ export default { ...@@ -236,7 +238,7 @@ export default {
} }
.list-dv { .list-dv {
width: 40%; width: 55%;
min-height: 100%; min-height: 100%;
border-left: solid 1px #efefef; border-left: solid 1px #efefef;
box-sizing: border-box; box-sizing: border-box;
......
<template> <template>
<div class="actuary w-full h-auto"> <div class="actuary w-full h-auto">
<Start class="start" /> <ParticleWavy class="start" />
<div class="act_cont"> <div class="act_cont">
<div class="act_tit"> <div class="act_tit">
<h1>智慧政务数据精算</h1> <h1>智慧政务数据精算</h1>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<script> <script>
import menu from "@/mixins/menu"; import menu from "@/mixins/menu";
import Start from "./ParticleWavy.vue"; import ParticleWavy from "@/components/ParticleWavy.vue";
import { mapState } from "vuex"; import { mapState } from "vuex";
import Storage from "@/utils/js/Storage"; import Storage from "@/utils/js/Storage";
export default { export default {
...@@ -54,7 +54,7 @@ export default { ...@@ -54,7 +54,7 @@ export default {
}; };
}, },
components: { components: {
Start, ParticleWavy,
}, },
computed: { computed: {
......
...@@ -308,6 +308,7 @@ export default { ...@@ -308,6 +308,7 @@ export default {
// 查看信息 // 查看信息
checkInfo(id) { checkInfo(id) {
this.loading = true;
getImpossibleInfo({ getImpossibleInfo({
id: id, id: id,
}).then((res) => { }).then((res) => {
...@@ -316,6 +317,7 @@ export default { ...@@ -316,6 +317,7 @@ export default {
this.$refs.FormDetails.fromData = data; this.$refs.FormDetails.fromData = data;
this.visible = true; this.visible = true;
} }
this.loading = false;
}); });
}, },
}, },
......
...@@ -96,7 +96,7 @@ const filterVal = [ ...@@ -96,7 +96,7 @@ const filterVal = [
"organization", "organization",
"customerDesignPictures", "customerDesignPictures",
"customerDesignVideos", "customerDesignVideos",
"memberLevel", "levelName",
"lastLoginTime", "lastLoginTime",
"status", "status",
]; // 导出的表头字段名,需要导出表格字段名 ]; // 导出的表头字段名,需要导出表格字段名
......
...@@ -383,6 +383,7 @@ export default { ...@@ -383,6 +383,7 @@ export default {
}, },
// 详情 // 详情
async checkInfo(id) { async checkInfo(id) {
this.loading = true;
let res = await getEvaData({ id }); let res = await getEvaData({ id });
if (res.code == 1) { if (res.code == 1) {
let { data } = res; let { data } = res;
...@@ -390,6 +391,7 @@ export default { ...@@ -390,6 +391,7 @@ export default {
this.detailsInfo = data; this.detailsInfo = data;
this.detailsVisible = true; this.detailsVisible = true;
} }
this.loading = false;
}, },
// 删除 // 删除
handleDel(id) { handleDel(id) {
......
...@@ -380,12 +380,14 @@ export default { ...@@ -380,12 +380,14 @@ export default {
}, },
// 详情 // 详情
async checkInfo(id) { async checkInfo(id) {
this.loading = true;
let res = await getQueEvaData({ id }); let res = await getQueEvaData({ id });
if (res.code == 1) { if (res.code == 1) {
let { data } = res; let { data } = res;
this.detailsInfo = data; this.detailsInfo = data;
this.detailsVisible = true; this.detailsVisible = true;
} }
this.loading = false;
}, },
// 删除 // 删除
handleDel(id) { handleDel(id) {
......
...@@ -381,6 +381,7 @@ export default { ...@@ -381,6 +381,7 @@ export default {
}, },
// 详情 // 详情
async checkInfo(id) { async checkInfo(id) {
this.loading = true;
let res = await getEvaData({ id }); let res = await getEvaData({ id });
if (res.code == 1) { if (res.code == 1) {
let { data } = res; let { data } = res;
...@@ -388,6 +389,7 @@ export default { ...@@ -388,6 +389,7 @@ export default {
this.detailsInfo = data; this.detailsInfo = data;
this.detailsVisible = true; this.detailsVisible = true;
} }
this.loading = false;
}, },
// 删除 // 删除
handleDel(id) { handleDel(id) {
......
...@@ -209,31 +209,15 @@ export default { ...@@ -209,31 +209,15 @@ export default {
// 获取报表 // 获取报表
async getPrintList() { async getPrintList() {
this.loading = true; this.loading = true;
let pramse = { let { total, data } = await this.getDataList();
page: this.current, this.total = total;
size: this.size, this.tableData = data;
siteId: this.siteId, this.$emit("update", { total, time: this.searchForm.time });
type: this.searchForm.status,
createTimeStart: this.searchForm.time[0],
createTimeEnd: this.searchForm.time[1],
};
if (this.searchForm.type == 1) {
pramse.matterName = `%${this.searchForm.searchName}%`;
} else {
pramse.materialName = `%${this.searchForm.searchName}%`;
}
let res = await getPrintList(pramse);
if (res.code == 1) {
let { data, total } = res.data;
this.total = total;
this.tableData = data;
this.$emit("update", { total, time: this.searchForm.time });
}
this.loading = false; this.loading = false;
}, },
// 获取导出数据 // 获取数据函数
async getExportPrintList() { async getDataList(searchForm) {
let list = []; let list = [];
let listTotal = 0; let listTotal = 0;
let pramse = { let pramse = {
...@@ -243,6 +227,7 @@ export default { ...@@ -243,6 +227,7 @@ export default {
type: this.searchForm.status, type: this.searchForm.status,
createTimeStart: this.searchForm.time[0], createTimeStart: this.searchForm.time[0],
createTimeEnd: this.searchForm.time[1], createTimeEnd: this.searchForm.time[1],
...searchForm,
}; };
if (this.searchForm.type == 1) { if (this.searchForm.type == 1) {
pramse.matterName = `%${this.searchForm.searchName}%`; pramse.matterName = `%${this.searchForm.searchName}%`;
...@@ -250,10 +235,10 @@ export default { ...@@ -250,10 +235,10 @@ export default {
pramse.materialName = `%${this.searchForm.searchName}%`; pramse.materialName = `%${this.searchForm.searchName}%`;
} }
let res = await getPrintList(pramse); let res = await getPrintList(pramse);
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data; let { data, total } = res.data;
list = data;
listTotal = total; listTotal = total;
list = data;
} }
return { return {
data: list, data: list,
...@@ -304,7 +289,7 @@ export default { ...@@ -304,7 +289,7 @@ export default {
"填单记录报表" + this.$moment().format("YYYYMMDDHHmmss") "填单记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
} else { } else {
this.dataSection(this.getExportPrintList, {}, (data) => { this.dataSection(this.getDataList, {}, (data) => {
if (!data.length) { if (!data.length) {
this.$message.warning("暂无数据"); this.$message.warning("暂无数据");
return; return;
......
...@@ -383,11 +383,13 @@ export default { ...@@ -383,11 +383,13 @@ export default {
}, },
// 详情 // 详情
async checkInfo({ id }) { async checkInfo({ id }) {
this.loading = true;
let res = await getOrderinfo({ id }); let res = await getOrderinfo({ id });
if (res.code == 1) { if (res.code == 1) {
this.detailsInfo = res.data; this.detailsInfo = res.data;
this.visible = true; this.visible = true;
} }
this.loading = false;
}, },
}, },
}; };
......
...@@ -32,8 +32,8 @@ import { mapState } from "vuex"; ...@@ -32,8 +32,8 @@ import { mapState } from "vuex";
import storage from "@/utils/js/Storage"; import storage from "@/utils/js/Storage";
import { export2Excel } from "@/utils/js/exportExcel"; import { export2Excel } from "@/utils/js/exportExcel";
import { getSys12345 } from "@/api/dataAdmin"; import { getSys12345 } from "@/api/dataAdmin";
const tHeader = ["序号", "微信号", "电话号码", "拨打位置", "拨打时间"]; // 导出的表头名信息 const tHeader = ["微信号", "电话号码", "拨打位置", "拨打时间"]; // 导出的表头名信息
const filterVal = ["index", "nickname", "phone", "address", "create_time"]; // 导出的表头字段名,需要导出表格字段名 const filterVal = ["nickname", "phone", "address", "create_time"]; // 导出的表头字段名,需要导出表格字段名
export default { export default {
components: {}, components: {},
data() { data() {
......
...@@ -50,7 +50,6 @@ import FormDetails from "./components/FormDetails.vue"; ...@@ -50,7 +50,6 @@ import FormDetails from "./components/FormDetails.vue";
import { export2Excel } from "@/utils/js/exportExcel"; import { export2Excel } from "@/utils/js/exportExcel";
import { adminList, letterInfo } from "@/api/dataAdmin"; import { adminList, letterInfo } from "@/api/dataAdmin";
const tHeader = [ const tHeader = [
"序号",
"工单编号", "工单编号",
"信件标题", "信件标题",
"信件类别", "信件类别",
...@@ -64,7 +63,6 @@ const tHeader = [ ...@@ -64,7 +63,6 @@ const tHeader = [
"办理部门", "办理部门",
]; // 导出的表头名信息 ]; // 导出的表头名信息
const filterVal = [ const filterVal = [
"index",
"LetterCode", "LetterCode",
"strTitle", "strTitle",
"strType", "strType",
...@@ -294,6 +292,18 @@ export default { ...@@ -294,6 +292,18 @@ export default {
if (this.selectedRowKeys.length && this.excelData.length) { if (this.selectedRowKeys.length && this.excelData.length) {
// 深度克隆避免影响页面表格展示 // 深度克隆避免影响页面表格展示
let data = this.$_.cloneDeep(this.excelData); let data = this.$_.cloneDeep(this.excelData);
for (let item of data) {
item.strGender =
item.strGender == 0 ? "" : item.strGender == 1 ? "" : "";
item.source =
item.source == 1
? "微官网"
: item.source == 2
? "自助服务系统"
: item.source == 3
? "数字填单系统"
: "";
}
export2Excel( export2Excel(
this.tHeader, this.tHeader,
this.filterVal, this.filterVal,
...@@ -306,6 +316,18 @@ export default { ...@@ -306,6 +316,18 @@ export default {
this.$message.warning("暂无数据"); this.$message.warning("暂无数据");
return; return;
} }
for (let item of data) {
item.strGender =
item.strGender == 0 ? "" : item.strGender == 1 ? "" : "";
item.source =
item.source == 1
? "微官网"
: item.source == 2
? "自助服务系统"
: item.source == 3
? "数字填单系统"
: "";
}
export2Excel( export2Excel(
this.tHeader, this.tHeader,
this.filterVal, this.filterVal,
...@@ -343,12 +365,14 @@ export default { ...@@ -343,12 +365,14 @@ export default {
}, },
// 查看信息 // 查看信息
checkInfo(id) { checkInfo(id) {
this.loading = true;
letterInfo({ id }).then((res) => { letterInfo({ id }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
let { data } = res; let { data } = res;
this.$refs.FormDetails.fromData = data; this.$refs.FormDetails.fromData = data;
this.visible = true; this.visible = true;
} }
this.loading = false;
}); });
}, },
}, },
......
...@@ -377,6 +377,7 @@ export default { ...@@ -377,6 +377,7 @@ export default {
// 查看信息 // 查看信息
checkInfo(id) { checkInfo(id) {
this.loading = true;
getWLLZInfo({ getWLLZInfo({
id: id, id: id,
}).then((res) => { }).then((res) => {
...@@ -385,6 +386,7 @@ export default { ...@@ -385,6 +386,7 @@ export default {
this.$refs.FormDetails.fromData = data; this.$refs.FormDetails.fromData = data;
this.visible = true; this.visible = true;
} }
this.loading = false;
}); });
}, },
}, },
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<a-tag <a-tag
class="cursor-pointer" class="cursor-pointer"
color="blue" color="blue"
@click="checkInfo(record.id)" @click="checkInfo(record.id, record)"
> >
详细信息 详细信息
</a-tag> </a-tag>
...@@ -361,6 +361,7 @@ export default { ...@@ -361,6 +361,7 @@ export default {
this.$emit("update", { total, time: this.searchForm.time }); this.$emit("update", { total, time: this.searchForm.time });
} }
this.loading = false; this.loading = false;
this.$forceUpdate();
}, },
// 翻页 // 翻页
...@@ -372,6 +373,7 @@ export default { ...@@ -372,6 +373,7 @@ export default {
// 查看用户信息 // 查看用户信息
async checkUser(row) { async checkUser(row) {
this.loading = true;
let res = await getPeopleanalyse({ let res = await getPeopleanalyse({
idcard: row.people_idcard, idcard: row.people_idcard,
peopleid: row.peopleid, peopleid: row.peopleid,
...@@ -381,11 +383,13 @@ export default { ...@@ -381,11 +383,13 @@ export default {
let { data } = res; let { data } = res;
this.userInfo = { ...row, ...data }; this.userInfo = { ...row, ...data };
} }
this.loading = false;
this.userInfoVisible = true; this.userInfoVisible = true;
}, },
// 查看业务信息 // 查看业务信息
async checkBusiness(row) { async checkBusiness(row) {
this.loading = true;
let res = await getBusinessEvent({ let res = await getBusinessEvent({
businessid: row.businessid, businessid: row.businessid,
time: this.searchForm.time, time: this.searchForm.time,
...@@ -397,10 +401,12 @@ export default { ...@@ -397,10 +401,12 @@ export default {
this.businessInfo = data; this.businessInfo = data;
this.analysisVisible = true; this.analysisVisible = true;
} }
this.loading = false;
}, },
// 查看工作人员 // 查看工作人员
async checkWorkman(id) { async checkWorkman(id) {
this.loading = true;
let res = await getWorkmananalyse({ let res = await getWorkmananalyse({
workmanid: id, workmanid: id,
time: this.searchForm.time, time: this.searchForm.time,
...@@ -410,19 +416,25 @@ export default { ...@@ -410,19 +416,25 @@ export default {
}); });
let { data } = res; let { data } = res;
this.workerInfo = { ...data, ...result.data }; this.workerInfo = { ...data, ...result.data };
this.loading = false;
this.workerInfoVisible = true; this.workerInfoVisible = true;
}, },
// 查看详细信息 // 查看详细信息
async checkInfo(id) { async checkInfo(id, row) {
this.loading = true;
let res = await getQueueInfo({ let res = await getQueueInfo({
id, id,
}); });
if (res.code == 1) { if (res.code == 1) {
let { data } = res; let { data } = res;
this.detailsInfo = data; this.detailsInfo = {
...data,
business: row.business,
};
this.detailsVisible = true; this.detailsVisible = true;
} }
this.loading = false;
}, },
// 勾选表格 // 勾选表格
......
...@@ -98,14 +98,27 @@ ...@@ -98,14 +98,27 @@
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="[0, 8]"> <a-row :gutter="[0, 8]">
<a-col :span="12"> <span>注册方式:</span>身份证注册 </a-col> <a-col :span="12">
<span>注册方式:</span
>{{
detailsInfo.register_type == "Applets"
? "小程序"
: detailsInfo.register_type == "wechat"
? "公众号"
: detailsInfo.register_type == "app"
? "自助服务终端"
: "--"
}}
</a-col>
<a-col :span="12"> <a-col :span="12">
<span>取号设备:</span>{{ detailsInfo.take_name }} <span>取号设备:</span>{{ detailsInfo.take_name }}
</a-col> </a-col>
</a-row> </a-row>
<!-- <a-row :gutter="[0, 8]"> <a-row :gutter="[0, 8]">
<a-col :span="12"> <span>健康状态:</span>绿码 </a-col> <a-col :span="24">
</a-row> --> <span>办理业务:</span>{{ detailsInfo.business || "--" }}
</a-col>
</a-row>
<!-- 当前办理步骤标识 --> <!-- 当前办理步骤标识 -->
<div class="transact-tips2" v-if="detailsInfo.style === 0"> <div class="transact-tips2" v-if="detailsInfo.style === 0">
<span class="tips-text"> 排队中 </span> <span class="tips-text"> 排队中 </span>
...@@ -140,7 +153,7 @@ ...@@ -140,7 +153,7 @@
</a-row> </a-row>
<a-row :gutter="[0, 8]"> <a-row :gutter="[0, 8]">
<a-col :span="12"> <a-col :span="12">
<span>叫号设备:</span>{{ detailsInfo.call_name }} <span>叫号设备:</span>{{ detailsInfo.call_name || "--" }}
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<a-tag <a-tag
class="cursor-pointer" class="cursor-pointer"
color="blue" color="blue"
@click="checkInfo(record.id)" @click="checkInfo(record.id, record)"
> >
详细信息 详细信息
</a-tag> </a-tag>
...@@ -354,6 +354,7 @@ export default { ...@@ -354,6 +354,7 @@ export default {
this.$emit("update", { total, time: this.searchForm.time }); this.$emit("update", { total, time: this.searchForm.time });
} }
this.loading = false; this.loading = false;
this.$forceUpdate();
}, },
// 翻页 // 翻页
...@@ -365,6 +366,7 @@ export default { ...@@ -365,6 +366,7 @@ export default {
// 查看用户信息 // 查看用户信息
async checkUser(row) { async checkUser(row) {
this.loading = true;
let res = await getPeopleanalyse({ let res = await getPeopleanalyse({
idcard: row.people_idcard, idcard: row.people_idcard,
peopleid: row.peopleid, peopleid: row.peopleid,
...@@ -374,11 +376,13 @@ export default { ...@@ -374,11 +376,13 @@ export default {
let { data } = res; let { data } = res;
this.userInfo = { ...row, ...data }; this.userInfo = { ...row, ...data };
} }
this.loading = false;
this.userInfoVisible = true; this.userInfoVisible = true;
}, },
// 查看业务信息 // 查看业务信息
async checkBusiness(row) { async checkBusiness(row) {
this.loading = true;
let res = await getBusinessEvent({ let res = await getBusinessEvent({
businessid: row.businessid, businessid: row.businessid,
time: this.searchForm.time, time: this.searchForm.time,
...@@ -390,10 +394,12 @@ export default { ...@@ -390,10 +394,12 @@ export default {
this.businessInfo = data; this.businessInfo = data;
this.analysisVisible = true; this.analysisVisible = true;
} }
this.loading = false;
}, },
// 查看工作人员 // 查看工作人员
async checkWorkman(id) { async checkWorkman(id) {
this.loading = true;
let res = await getWorkmananalyse({ let res = await getWorkmananalyse({
workmanid: id, workmanid: id,
time: this.searchForm.time, time: this.searchForm.time,
...@@ -403,19 +409,25 @@ export default { ...@@ -403,19 +409,25 @@ export default {
}); });
let { data } = res; let { data } = res;
this.workerInfo = { ...data, ...result.data }; this.workerInfo = { ...data, ...result.data };
this.loading = false;
this.workerInfoVisible = true; this.workerInfoVisible = true;
}, },
// 查看详细信息 // 查看详细信息
async checkInfo(id) { async checkInfo(id, row) {
this.loading = true;
let res = await getQueueInfo({ let res = await getQueueInfo({
id, id,
}); });
if (res.code == 1) { if (res.code == 1) {
let { data } = res; let { data } = res;
this.detailsInfo = data; this.detailsInfo = {
...data,
business: row.business,
};
this.detailsVisible = true; this.detailsVisible = true;
} }
this.loading = false;
}, },
// 勾选表格 // 勾选表格
......
...@@ -37,8 +37,10 @@ ...@@ -37,8 +37,10 @@
<div class="ellipsis" :title="text"> <div class="ellipsis" :title="text">
{{ text ? text : "--" }} {{ text ? text : "--" }}
</div> </div>
<div class="ellipsis" :title="record.materiaFullName"> <div class="ellipsis" :title="record.materialFullName">
样表全称:{{ record.materiaFullName ? record.materiaFullName : "--" }} 样表全称:{{
record.materialFullName ? record.materialFullName : "--"
}}
</div> </div>
</template> </template>
<!-- 类型 --> <!-- 类型 -->
...@@ -76,8 +78,8 @@ const filterVal = [ ...@@ -76,8 +78,8 @@ const filterVal = [
"materialName", "materialName",
"materialFullName", "materialFullName",
"deviceName", "deviceName",
"createTime",
"operTime", "operTime",
"createTime",
]; // 导出的表头字段名,需要导出表格字段名 ]; // 导出的表头字段名,需要导出表格字段名
export default { export default {
data() { data() {
...@@ -115,11 +117,11 @@ export default { ...@@ -115,11 +117,11 @@ export default {
}, },
{ {
title: "操作时间", title: "操作时间",
dataIndex: "createTime", dataIndex: "operTime",
}, },
{ {
title: "查看时间", title: "查看时间",
dataIndex: "operTime", dataIndex: "createTime",
customRender: (text) => { customRender: (text) => {
return text ? text : "--"; return text ? text : "--";
}, },
...@@ -173,31 +175,15 @@ export default { ...@@ -173,31 +175,15 @@ export default {
// 获取报表 // 获取报表
async getBillList() { async getBillList() {
this.loading = true; this.loading = true;
let pramse = { let { total, data } = await this.getDataList();
page: this.current, this.total = total;
size: this.size, this.tableData = data;
siteId: this.siteId, this.$emit("update", { total, time: this.searchForm.time });
type: this.searchForm.status,
operTimeStart: this.searchForm.time[0],
operTimeEnd: this.searchForm.time[1],
};
if (this.searchForm.type == 1) {
pramse.matterName = `%${this.searchForm.searchName}%`;
} else {
pramse.materialName = `%${this.searchForm.searchName}%`;
}
let res = await getBillList(pramse);
if (res.code == 1) {
let { data, total } = res.data;
this.total = total;
this.tableData = data;
this.$emit("update", { total, time: this.searchForm.time });
}
this.loading = false; this.loading = false;
}, },
// 获取导出数据 // 获取数据函数
async getExportPrintList() { async getDataList(searchForm) {
let list = []; let list = [];
let listTotal = 0; let listTotal = 0;
let pramse = { let pramse = {
...@@ -207,6 +193,7 @@ export default { ...@@ -207,6 +193,7 @@ export default {
type: this.searchForm.status, type: this.searchForm.status,
operTimeStart: this.searchForm.time[0], operTimeStart: this.searchForm.time[0],
operTimeEnd: this.searchForm.time[1], operTimeEnd: this.searchForm.time[1],
...searchForm,
}; };
if (this.searchForm.type == 1) { if (this.searchForm.type == 1) {
pramse.matterName = `%${this.searchForm.searchName}%`; pramse.matterName = `%${this.searchForm.searchName}%`;
...@@ -216,8 +203,8 @@ export default { ...@@ -216,8 +203,8 @@ export default {
let res = await getBillList(pramse); let res = await getBillList(pramse);
if (res.code == 1) { if (res.code == 1) {
let { data, total } = res.data; let { data, total } = res.data;
list = data;
listTotal = total; listTotal = total;
list = data;
} }
return { return {
data: list, data: list,
...@@ -257,7 +244,7 @@ export default { ...@@ -257,7 +244,7 @@ export default {
"样表记录报表" + this.$moment().format("YYYYMMDDHHmmss") "样表记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
} else { } else {
this.dataSection(this.getExportPrintList, {}, (data) => { this.dataSection(this.getDataList, {}, (data) => {
if (!data.length) { if (!data.length) {
this.$message.warning("暂无数据"); this.$message.warning("暂无数据");
return; return;
......
...@@ -11,22 +11,12 @@ ...@@ -11,22 +11,12 @@
class="flex items-center justify-between flex-shrink-0 pl-[10px] pr-[10px]" class="flex items-center justify-between flex-shrink-0 pl-[10px] pr-[10px]"
> >
<div <div
:class="['tab-item', { active: active == 'CensusType_1' }]" v-for="v in CensusTypeList"
@click="changeCensusType('CensusType_1')" :key="v.type"
:class="['tab-item', { active: active == v.type }]"
@click="changeCensusType(v.type)"
> >
聚焦服务 {{ v.name }}
</div>
<div
:class="['tab-item', { active: active == 'CensusType_2' }]"
@click="changeCensusType('CensusType_2')"
>
聚焦协同
</div>
<div
:class="['tab-item', { active: active == 'CensusType_3' }]"
@click="changeCensusType('CensusType_3')"
>
聚焦监管
</div> </div>
</div> </div>
<div <div
...@@ -91,6 +81,20 @@ export default { ...@@ -91,6 +81,20 @@ export default {
data() { data() {
return { return {
siteId: Storage.get(2, "siteId"), siteId: Storage.get(2, "siteId"),
CensusTypeList: [
{
type: "CensusType_1",
name: "聚焦服务",
},
{
type: "CensusType_2",
name: "聚焦协同",
},
{
type: "CensusType_3",
name: "聚焦监管",
},
],
CensusType_1: [], // 服务 CensusType_1: [], // 服务
CensusType_2: [], // 协同 CensusType_2: [], // 协同
CensusType_3: [], // 监管 CensusType_3: [], // 监管
......
package com.mortals.xhx.module.page.service.impl; package com.mortals.xhx.module.page.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.page.model.pdu.BuryPointPdu;
import com.mortals.xhx.module.page.model.pdu.PageCensusPdu;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.page.dao.PageAccessDao; import com.mortals.xhx.module.page.dao.PageAccessDao;
import com.mortals.xhx.module.page.model.PageAccessEntity; import com.mortals.xhx.module.page.model.PageAccessEntity;
import com.mortals.xhx.module.page.model.pdu.BuryPointPdu;
import com.mortals.xhx.module.page.model.pdu.PageCensusPdu;
import com.mortals.xhx.module.page.service.PageAccessService; import com.mortals.xhx.module.page.service.PageAccessService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.ParseException; import java.text.ParseException;
...@@ -122,7 +121,7 @@ public class PageAccessServiceImpl extends AbstractCRUDServiceImpl<PageAccessDao ...@@ -122,7 +121,7 @@ public class PageAccessServiceImpl extends AbstractCRUDServiceImpl<PageAccessDao
if(CollectionUtils.isNotEmpty(todayList)){ if(CollectionUtils.isNotEmpty(todayList)){
for (PageAccessEntity item:todayList){ for (PageAccessEntity item:todayList){
if(item!=null) { if(item!=null) {
DecimalFormat decimalFormat=new DecimalFormat(".00"); DecimalFormat decimalFormat=new DecimalFormat("#0.00");
String key = item.getTimeStr() + "_" + item.getFirstCode() + "_" + item.getSecondCode() + "_" + item.getThirdCode() + "_" + item.getFourthCode(); String key = item.getTimeStr() + "_" + item.getFirstCode() + "_" + item.getSecondCode() + "_" + item.getThirdCode() + "_" + item.getFourthCode();
if (mp.containsKey(key)) { if (mp.containsKey(key)) {
PageAccessEntity last = mp.get(key); PageAccessEntity last = mp.get(key);
......
...@@ -127,7 +127,7 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao, ...@@ -127,7 +127,7 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao,
float a = (float)vo.getValue(); float a = (float)vo.getValue();
float b = (float)clickSum; float b = (float)clickSum;
float p = a/b; float p = a/b;
DecimalFormat decimalFormat=new DecimalFormat(".00%"); DecimalFormat decimalFormat=new DecimalFormat("#0.00%");
String s = decimalFormat.format(p); String s = decimalFormat.format(p);
vo.setProportion(s); vo.setProportion(s);
} }
...@@ -173,7 +173,7 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao, ...@@ -173,7 +173,7 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao,
float a = (float)clickSum; float a = (float)clickSum;
float b = (float)trendCensusVos.size(); float b = (float)trendCensusVos.size();
float p = a/b; float p = a/b;
DecimalFormat decimalFormat=new DecimalFormat(".00"); DecimalFormat decimalFormat=new DecimalFormat("#0.00");
String s = decimalFormat.format(p); String s = decimalFormat.format(p);
dayAccessAvg = Float.valueOf(s); dayAccessAvg = Float.valueOf(s);
} }
...@@ -232,8 +232,8 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao, ...@@ -232,8 +232,8 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao,
float a = (float)clickSum; float a = (float)clickSum;
float b = (float)item.getAccessCount(); float b = (float)item.getAccessCount();
float p = b/a; float p = b/a;
DecimalFormat decimalFormat=new DecimalFormat(".00%"); DecimalFormat decimalFormat=new DecimalFormat("#0.00%");
DecimalFormat df=new DecimalFormat(".00"); DecimalFormat df=new DecimalFormat("#0.00");
String s = decimalFormat.format(p); String s = decimalFormat.format(p);
String s1 = df.format(p); String s1 = df.format(p);
item.setProportion(s); item.setProportion(s);
......
...@@ -75,7 +75,15 @@ public class PageRouteServiceImpl extends AbstractCRUDServiceImpl<PageRouteDao, ...@@ -75,7 +75,15 @@ public class PageRouteServiceImpl extends AbstractCRUDServiceImpl<PageRouteDao,
} }
Map<String,Object> result = new HashMap<>(); Map<String,Object> result = new HashMap<>();
List<PageWayCensusVo> pageWayCensusVos = dao.getPageWayCensus(pdu); List<PageWayCensusVo> pageWayCensusVos = dao.getPageWayCensus(pdu);
result.put("links",pageWayCensusVos); List<PageWayCensusVo> list = new ArrayList<>();
Map<String,String> source = new HashMap<>();
for(PageWayCensusVo item:pageWayCensusVos){
source.put(item.getSource(),item.getSourceName());
if(!source.containsKey(item.getTarget())){
list.add(item);
}
}
result.put("links",list);
List<Map<String, Object>> pageCodes = dao.getPageWayCode(pdu); List<Map<String, Object>> pageCodes = dao.getPageWayCode(pdu);
result.put("data",pageCodes); result.put("data",pageCodes);
return result; return result;
......
...@@ -8,6 +8,7 @@ import com.mortals.framework.model.Context; ...@@ -8,6 +8,7 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result; import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICacheService; import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.StringUtils;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.common.utils.LoginAESUtil; import com.mortals.xhx.common.utils.LoginAESUtil;
import com.mortals.xhx.module.param.service.ParamService; import com.mortals.xhx.module.param.service.ParamService;
...@@ -87,9 +88,11 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic ...@@ -87,9 +88,11 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
@Override @Override
protected void saveBefore(UserEntity entity, Map<String, Object> model, Context context) throws AppException { protected void saveBefore(UserEntity entity, Map<String, Object> model, Context context) throws AppException {
String loginName = LoginAESUtil.decrypt(entity.getLoginName(),AES_KEY,AES_IV,LoginAESUtil.AES_CBC); String loginName = LoginAESUtil.decrypt(entity.getLoginName(),AES_KEY,AES_IV,LoginAESUtil.AES_CBC);
String loginPwd = LoginAESUtil.decrypt(entity.getLoginPwd(),AES_KEY,AES_IV,LoginAESUtil.AES_CBC);
entity.setLoginName(loginName); entity.setLoginName(loginName);
entity.setLoginPwd(loginPwd); if(StringUtils.isNotEmpty(entity.getLoginPwd())) {
String loginPwd = LoginAESUtil.decrypt(entity.getLoginPwd(), AES_KEY, AES_IV, LoginAESUtil.AES_CBC);
entity.setLoginPwd(loginPwd);
}
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment