更新
48
src/App.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view v-if="isRouterAlive" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import "@/assets/iconfont/iconfont.css";
|
||||
import { initDictToLocalstorage } from "@/api/dict-data";
|
||||
export default {
|
||||
name: "App",
|
||||
provide() {
|
||||
return {
|
||||
reload: this.reload
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isRouterAlive: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$route(to, form) {
|
||||
if (to.path == "/login") {
|
||||
this.queryDictName();
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
created() {
|
||||
this.queryDictName();
|
||||
},
|
||||
methods: {
|
||||
queryDictName() {
|
||||
// 初始化数据字典到浏览器本地缓存
|
||||
initDictToLocalstorage(() => {
|
||||
this.isRouterAlive = true;
|
||||
});
|
||||
},
|
||||
reload() {
|
||||
this.isRouterAlive = false;
|
||||
this.$nextTick(function() {
|
||||
this.isRouterAlive = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
71
src/api/GaeaReport.js
Normal file
@@ -0,0 +1,71 @@
|
||||
import request from '@/utils/request'
|
||||
import {getShareToken, getToken} from "@/utils/auth";
|
||||
|
||||
// 设计报表
|
||||
export function design(data) {
|
||||
return request({
|
||||
url: 'report/design',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 预览报表,渲染数据
|
||||
export function preview(data) {
|
||||
return request({
|
||||
url: 'reportExcel/preview',
|
||||
method: 'post',
|
||||
headers: { 'Share-Token': getShareToken(), 'Authorization': getToken() },
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 导出报表
|
||||
export function exportExcel(data) {
|
||||
return request({
|
||||
url: 'reportExcel/exportExcel',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 导出报表
|
||||
export function exportPdf(data) {
|
||||
return request({
|
||||
url: 'reportExcel/exportPdf',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 获取所有数据集
|
||||
export function queryAllDataSet() {
|
||||
return request({
|
||||
url: 'dataSet/queryAllDataSet',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取对应数据集的列集合
|
||||
export function detail(data) {
|
||||
return request({
|
||||
url: 'dataSet/detailBysetId/' + data,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取对应数据集的列集合
|
||||
export function detailBysetCode(data) {
|
||||
return request({
|
||||
url: 'dataSet/detailBysetCode/' + data,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 根据reportCode获取报表表格详情
|
||||
export function detailByReportCode(data) {
|
||||
return request({
|
||||
url: 'reportExcel/detailByReportCode/' + data,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
42
src/api/accessAuthority.js
Normal file
@@ -0,0 +1,42 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function accessAuthorityList(params) {
|
||||
return request({
|
||||
url: 'accessAuthority/pageList',
|
||||
method: 'GET',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
export function accessAuthorityAdd(data) {
|
||||
return request({
|
||||
url: 'accessAuthority',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function accessAuthorityDeleteBatch(data) {
|
||||
return request({
|
||||
url: 'accessAuthority/delete/batch',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function accessAuthorityUpdate(data) {
|
||||
return request({
|
||||
url: 'accessAuthority',
|
||||
method: 'put', data,
|
||||
})
|
||||
}
|
||||
|
||||
export function accessAuthorityDetail(data) {
|
||||
return request({
|
||||
url: 'accessAuthority/' + data.id,
|
||||
method: 'get',
|
||||
params: { accessKey: data.accessKey }
|
||||
})
|
||||
}
|
||||
|
||||
export default { accessAuthorityList, accessAuthorityAdd, accessAuthorityDeleteBatch, accessAuthorityUpdate, accessAuthorityDetail }
|
||||
58
src/api/accessRole.js
Normal file
@@ -0,0 +1,58 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function accessRoleList (params) {
|
||||
return request({
|
||||
url: 'accessRole/pageList',
|
||||
method: 'GET',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
export function accessRoleAdd (data) {
|
||||
return request({
|
||||
url: 'accessRole',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function accessRoleDeleteBatch (data) {
|
||||
return request({
|
||||
url: 'accessRole/delete/batch',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function accessRoleUpdate (data) {
|
||||
return request({
|
||||
url: 'accessRole',
|
||||
method: 'put', data,
|
||||
})
|
||||
}
|
||||
|
||||
export function accessRoleDetail (data) {
|
||||
return request({
|
||||
url: 'accessRole/' + data.id,
|
||||
method: 'get',
|
||||
params: { accessKey: data.accessKey }
|
||||
})
|
||||
}
|
||||
|
||||
export function accessRoleAuthorityTree (roleCode) {
|
||||
return request({
|
||||
url: 'accessRole/authorityTree/' + roleCode,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function saveAuthorityTree (data) {
|
||||
return request({
|
||||
url: 'accessRole/saveAuthorityTree',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export default { accessRoleList, accessRoleAdd, accessRoleDeleteBatch, accessRoleUpdate, accessRoleDetail, accessRoleAuthorityTree, saveAuthorityTree }
|
||||
59
src/api/accessUser.js
Normal file
@@ -0,0 +1,59 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function accessUserList (params) {
|
||||
return request({
|
||||
url: 'accessUser/pageList',
|
||||
method: 'GET',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
export function accessUserAdd (data) {
|
||||
return request({
|
||||
url: 'accessUser',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function accessUserDeleteBatch (data) {
|
||||
return request({
|
||||
url: 'accessUser/delete/batch',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function accessUserUpdate (data) {
|
||||
return request({
|
||||
url: 'accessUser',
|
||||
method: 'put', data,
|
||||
})
|
||||
}
|
||||
|
||||
export function accessUserDetail (data) {
|
||||
return request({
|
||||
url: 'accessUser/' + data.id,
|
||||
method: 'get',
|
||||
params: { accessKey: data.accessKey }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function getRoleTree (loginName) {
|
||||
return request({
|
||||
url: 'accessUser/roleTree/' + loginName,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function saveRoleTree (data) {
|
||||
return request({
|
||||
url: 'accessUser/saveRoleTree',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export default { accessUserList, accessUserAdd, accessUserDeleteBatch, accessUserUpdate, accessUserDetail, getRoleTree, saveRoleTree }
|
||||
71
src/api/axios.js
Normal file
@@ -0,0 +1,71 @@
|
||||
import axios from 'axios';
|
||||
import { Message, MessageBox } from 'element-ui';
|
||||
axios.defaults.baseURL = process.env.BASE_API
|
||||
const service = axios.create({
|
||||
withCredentials: false,
|
||||
timeout: 60000,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
}
|
||||
})
|
||||
|
||||
service.interceptors.request.use(
|
||||
config => {
|
||||
return config
|
||||
},
|
||||
error => {
|
||||
// Do something with request error
|
||||
Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
// response interceptor
|
||||
service.interceptors.response.use(
|
||||
response => {
|
||||
const res = response.data;
|
||||
if (res.code == 200) {
|
||||
return res
|
||||
}
|
||||
|
||||
else if (res.code == '50014') {
|
||||
//登录超时或被登出,弹确认框,用户确认后,跳转到登录页面
|
||||
MessageBox({
|
||||
message: "当前登录已失效或异地登录,请重新登录",
|
||||
type: 'error',
|
||||
duration: 3 * 1000,
|
||||
}).then(() => {
|
||||
sessionStorage.clear();
|
||||
localStorage.clear();
|
||||
window.location.href = "/";
|
||||
}).catch(err => {
|
||||
})
|
||||
} else if (res.code == "3100" || res.code == "3101") {
|
||||
return res;
|
||||
}
|
||||
else {
|
||||
Message({
|
||||
message: res.repMsg || res.message,
|
||||
type: 'error',
|
||||
duration: 3 * 1000
|
||||
})
|
||||
return res;
|
||||
}
|
||||
},
|
||||
error => {
|
||||
var errorStatus = error.response.code;
|
||||
var errorData = error.response.data;
|
||||
var messageTxt = "";
|
||||
if (errorStatus != 200) {
|
||||
messageTxt = "服务器内部错误,请联系管理员";
|
||||
} else {
|
||||
messageTxt = '失败原因:' + errorData.code + '--' + errorData.repMsg;
|
||||
}
|
||||
Message({
|
||||
message: messageTxt,
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
export default service
|
||||
75
src/api/bigscreen.js
Normal file
@@ -0,0 +1,75 @@
|
||||
import request from '@/utils/request'
|
||||
import { getShareToken, getToken } from "@/utils/auth";
|
||||
import axios from 'axios';
|
||||
|
||||
// 保存大屏设计
|
||||
export function insertDashboard(data) {
|
||||
return request({
|
||||
url: 'reportDashboard',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 预览、查询大屏详情
|
||||
export function detailDashboard(data) {
|
||||
return request({
|
||||
url: 'reportDashboard/' + data,
|
||||
headers: { 'Share-Token': getShareToken(), 'Authorization': getToken() },
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 数据集查询
|
||||
export function queryAllDataSet(data) {
|
||||
return request({
|
||||
url: 'dataSet/queryAllDataSet',
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
// 获取数据集信息
|
||||
export function detailBysetId(data) {
|
||||
return request({
|
||||
url: 'dataSet/detailBysetId/' + data,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取动态数据
|
||||
export function getData(data) {
|
||||
return request({
|
||||
url: 'reportDashboard/getData',
|
||||
method: 'post',
|
||||
headers: { 'Share-Token': getShareToken(), 'Authorization': getToken() },
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 导出大屏
|
||||
export function exportDashboard(data) {
|
||||
return new Promise((resolve) =>{
|
||||
axios({
|
||||
method:'get',
|
||||
url: process.env.BASE_API + '/reportDashboard/export',
|
||||
headers: { 'Authorization': getToken() },
|
||||
params:data,
|
||||
responseType:'blob'
|
||||
}).then(res =>{
|
||||
resolve(res.data);
|
||||
}).catch(err =>{
|
||||
resolve('error');
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// 导入大屏
|
||||
export function importDashboard(data) {
|
||||
return request({
|
||||
url: 'reportDashboard/import',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
64
src/api/calculation/calculation.js
Normal file
@@ -0,0 +1,64 @@
|
||||
import request from '@/api/axios'
|
||||
|
||||
// 分页查询
|
||||
export const reqPageList = data => {
|
||||
return request({
|
||||
url: '/analysis-service/calculate/queryByPage',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增
|
||||
export const reqAddDeviceType = data => {
|
||||
return request({
|
||||
url: '/analysis-service/calculate/create',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 编辑
|
||||
export const reqEditDeviceType = data => {
|
||||
return request({
|
||||
url: '/analysis-service/calculate/updateById',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const reqDeleteDeviceType = data => {
|
||||
return request({
|
||||
url: '/analysis-service/calculate/deleteByIds',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据id查明细
|
||||
export const reqDetail = data => {
|
||||
return request({
|
||||
url: '/analysis-service/calculate/queryById',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据监控项id 拉取监控项树结构
|
||||
export const reqItemTree = data => {
|
||||
return request({
|
||||
url: '/analysis-service/item/tree',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 计算执行sql 语句
|
||||
export const reqExecuteSql = data => {
|
||||
return request({
|
||||
url: '/analysis-service/calculate/executeSql',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
25
src/api/common.js
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* @Author: qianlishi
|
||||
* @Date: 2020-07-13 15:13:34
|
||||
* @Last Modified by: qianlishi
|
||||
* @Last Modified time: 2021-03-15 13:28:28
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 数据字典接口
|
||||
export function dataDictionary (dictName) {
|
||||
return request({
|
||||
url: '/gaeaDict/select/' + dictName,
|
||||
method: 'GET',
|
||||
})
|
||||
}
|
||||
|
||||
// 图片上传接口
|
||||
export function uploadImg (data) {
|
||||
return request({
|
||||
url: '/file/upload',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
79
src/api/dict-data.js
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* @Author: qianlishi
|
||||
* @Date: 2020-07-13 15:13:17
|
||||
* @Last Modified by: qianlishi
|
||||
* @Last Modified time: 2020-12-15 15:34:34
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
import { setStorageItem } from '@/utils/storage'
|
||||
// 数据字典和基础数据查询的相关接口
|
||||
|
||||
/**
|
||||
* 数据字典多类型编码查询接口
|
||||
* type参数 类型 String
|
||||
* type参数 格式 'type'
|
||||
*/
|
||||
export function getDictList (type) {
|
||||
return request({
|
||||
url: `/gaeaDict/select/${type}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
export function getDictCodes (project) {
|
||||
return request({
|
||||
url: `/gaeaDict/selectAll/${project}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据字典多类型编码查询接口
|
||||
* typeList参数 类型 Array
|
||||
* typeList参数 格式 ['type1','type2',...]
|
||||
*/
|
||||
export function getMultipleDictList (typeList) {
|
||||
const types = typeList + ''
|
||||
return request({
|
||||
url: `/v1/dict/types`,
|
||||
method: 'get',
|
||||
params: { types },
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 主数据编码查询接口
|
||||
* typeList参数 类型 Array
|
||||
* typeList参数 格式 ['type1','type2',...]
|
||||
*/
|
||||
export function getBaseDataList (typeList) {
|
||||
const types = typeList + ''
|
||||
return request({
|
||||
url: `/v1/master/types`,
|
||||
method: 'get',
|
||||
params: { types },
|
||||
})
|
||||
}
|
||||
|
||||
// 查询所有数据字典接口
|
||||
export function getAllDict() {
|
||||
return request({
|
||||
url: '/gaeaDict/all',
|
||||
method: 'GET',
|
||||
})
|
||||
}
|
||||
|
||||
// 将所有接口初始化到浏览器本地缓存
|
||||
export function initDictToLocalstorage(callback) {
|
||||
getAllDict().then((res) => {
|
||||
if (res.code != 200) {
|
||||
console.error('初始化数据字典到local storage失败: ' + res.message)
|
||||
return
|
||||
}
|
||||
|
||||
// 保存数据字典到localStorage
|
||||
setStorageItem('AJReportDict', res.data)
|
||||
if (callback != null) {
|
||||
callback()
|
||||
}
|
||||
})
|
||||
}
|
||||
75
src/api/dict.js
Normal file
@@ -0,0 +1,75 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 字典管理查询
|
||||
export function getDictList(params) {
|
||||
return request({
|
||||
url: '/gaeaDict/pageList',
|
||||
method: 'GET',
|
||||
params,
|
||||
})
|
||||
}
|
||||
// 获取单个字典数据
|
||||
export function getDictItems(dictCode) {
|
||||
return request({
|
||||
url: `/gaeaDict/select/${dictCode}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 字典管理新增
|
||||
export function dictAdd(data) {
|
||||
return request({
|
||||
url: '/gaeaDict',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 字典管理编辑
|
||||
export function dictEdit(data) {
|
||||
return request({
|
||||
url: '/gaeaDict',
|
||||
method: 'PUT',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function dictDetail(data) {
|
||||
return request({
|
||||
url: '/gaeaDict/' + data.id,
|
||||
method: 'get',
|
||||
params: { accessKey: data.accessKey },
|
||||
})
|
||||
}
|
||||
|
||||
// 字典管理批量删除
|
||||
export function dictsDelect(data) {
|
||||
return request({
|
||||
url: `/gaeaDict/delete/batch`,
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新数据字典
|
||||
* @param data
|
||||
*/
|
||||
export function freshDict(data) {
|
||||
return request({
|
||||
url: '/gaeaDict/freshDict',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 获取国家省份城市
|
||||
export function queryCountryCity(value) {
|
||||
return request({
|
||||
url: `/countryCity/select`,
|
||||
method: 'get',
|
||||
params: {
|
||||
value: value,
|
||||
},
|
||||
})
|
||||
}
|
||||
export default { dictDetail, getDictList, dictAdd, dictEdit, dictsDelect }
|
||||
47
src/api/dictItem.js
Normal file
@@ -0,0 +1,47 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 字典项管理查询
|
||||
export function dictItemPageList(params) {
|
||||
return request({
|
||||
url: '/gaeaDictItem/pageList',
|
||||
method: 'GET',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
// 字典项管理新增
|
||||
export function dictItemAdd(data) {
|
||||
return request({
|
||||
url: '/gaeaDictItem',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 字典项管理编辑
|
||||
export function dictItemEdit(data) {
|
||||
return request({
|
||||
url: '/gaeaDictItem',
|
||||
method: 'PUT',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 字典项管理批量删除
|
||||
export function dictsItemDelect(data) {
|
||||
return request({
|
||||
url: `/gaeaDictItem/delete/batch`,
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function dictItemDetail(data) {
|
||||
return request({
|
||||
url: '/gaeaDictItem/' + data.id,
|
||||
method: 'get',
|
||||
params: { accessKey: data.accessKey },
|
||||
})
|
||||
}
|
||||
|
||||
export default { dictItemDetail, dictItemPageList, dictItemAdd, dictItemEdit, dictsItemDelect }
|
||||
58
src/api/file.js
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* @Author: zyk
|
||||
* @Date: 2021-02-23 15:13:17
|
||||
* @Last Modified by: zyk
|
||||
* @Last Modified time: 2021-03-15 13:28:36
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
// 导出中心
|
||||
|
||||
export function download(fileId) {
|
||||
return request({
|
||||
url: `/file/download/${fileId}`,
|
||||
responseType: 'blob',
|
||||
method: 'GET',
|
||||
})
|
||||
}
|
||||
|
||||
export function fileList(params) {
|
||||
return request({
|
||||
url: '/file/pageList',
|
||||
method: 'GET',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
export function fileAdd(data) {
|
||||
return request({
|
||||
url: '/file',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function fileDel(data) {
|
||||
return request({
|
||||
url: `/file/delete/batch`,
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function fileUpdate(data) {
|
||||
return request({
|
||||
url: '/file',
|
||||
method: 'put',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function fileDetail(data) {
|
||||
return request({
|
||||
url: '/file/' + data.id,
|
||||
method: 'get',
|
||||
params: data,
|
||||
})
|
||||
}
|
||||
|
||||
export default { fileList, fileAdd, fileDel, fileUpdate, fileDetail }
|
||||
25
src/api/login/index.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function login (data) {
|
||||
return request({
|
||||
url: 'accessUser/login',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function logout () {
|
||||
return request({
|
||||
url: 'accessUser/logout',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 登录之后 根据旧修改密码
|
||||
export function reqUpdatePassword (data) {
|
||||
return request({
|
||||
url: '/accessUser/updatePassword',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
131
src/api/report.js
Normal file
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* @Author: qianlishi
|
||||
* @Date: 2020-07-13 15:13:37
|
||||
* @Last Modified by: qianlishi
|
||||
* @Last Modified time: 2021-03-04 10:46:26
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// resultset
|
||||
export function dataSetPreview (data) {
|
||||
return request({
|
||||
url: `/dataSet/detailBysetId/${data.id}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function addDataSet (data) {
|
||||
return request({
|
||||
url: '/dataSet',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
export function editDataSet (data) {
|
||||
return request({
|
||||
url: '/dataSet',
|
||||
method: 'put',
|
||||
data,
|
||||
})
|
||||
}
|
||||
// delete dataset
|
||||
export function deleteDataSet (data) {
|
||||
return request({
|
||||
url: '/dataSet/' + data.id,
|
||||
method: 'delete',
|
||||
data,
|
||||
})
|
||||
}
|
||||
// 下拉数据源
|
||||
export function queryAllDataSourceSet (data) {
|
||||
return request({
|
||||
url: '/dataSource/queryAllDataSource',
|
||||
method: 'get',
|
||||
data,
|
||||
})
|
||||
}
|
||||
// 数据集高级规则js验证
|
||||
export function verificationSet (data) {
|
||||
return request({
|
||||
url: '/dataSetParam/verification',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
// 测试数据转换,以及返回数据table列表
|
||||
export function testTransformSet (data) {
|
||||
return request({
|
||||
url: '/dataSet/testTransform',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// report
|
||||
export function reportPageList (params) {
|
||||
return request({
|
||||
url: '/report/pageList',
|
||||
method: 'get',
|
||||
params,
|
||||
})
|
||||
}
|
||||
// report
|
||||
export function addReport (data) {
|
||||
return request({
|
||||
url: '/report',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// report
|
||||
export function editReport (data) {
|
||||
return request({
|
||||
url: '/report',
|
||||
method: 'put',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// report
|
||||
export function delReport (data) {
|
||||
return request({
|
||||
url: '/report/delReport',
|
||||
method: 'delete',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// report
|
||||
export function detailReport (id, accessKey) {
|
||||
return request({
|
||||
url: `/report/${id}?accessKey=${accessKey}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// reportExcel
|
||||
export function addReportExcel (data) {
|
||||
return request({
|
||||
url: '/reportExcel',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// reportExcel
|
||||
export function editReportExcel (data) {
|
||||
return request({
|
||||
url: '/reportExcel',
|
||||
method: 'put',
|
||||
data,
|
||||
})
|
||||
}
|
||||
// /dataSet/pageList
|
||||
export function dataSetPageList (params) {
|
||||
return request({
|
||||
url: '/dataSet/pageList',
|
||||
method: 'GET',
|
||||
params,
|
||||
})
|
||||
}
|
||||
42
src/api/reportDataSet.js
Normal file
@@ -0,0 +1,42 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function reportDataSetList(params) {
|
||||
return request({
|
||||
url: 'dataSet/pageList',
|
||||
method: 'GET',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
export function reportDataSetAdd(data) {
|
||||
return request({
|
||||
url: 'dataSet',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function reportDataSetDeleteBatch(data) {
|
||||
return request({
|
||||
url: 'dataSet/delete/batch',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function reportDataSetUpdate(data) {
|
||||
return request({
|
||||
url: 'dataSet',
|
||||
method: 'put', data,
|
||||
})
|
||||
}
|
||||
|
||||
export function reportDataSetDetail(data) {
|
||||
return request({
|
||||
url: 'dataSet/' + data.id,
|
||||
method: 'get',
|
||||
params: { accessKey: data.accessKey }
|
||||
})
|
||||
}
|
||||
|
||||
export default { reportDataSetList, reportDataSetAdd, reportDataSetDeleteBatch, reportDataSetUpdate, reportDataSetDetail }
|
||||
51
src/api/reportDataSource.js
Normal file
@@ -0,0 +1,51 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function reportDataSourceList(params) {
|
||||
return request({
|
||||
url: 'dataSource/pageList',
|
||||
method: 'GET',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
export function reportDataSourceAdd(data) {
|
||||
return request({
|
||||
url: 'dataSource',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function reportDataSourceDeleteBatch(data) {
|
||||
return request({
|
||||
url: 'dataSource/delete/batch',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function reportDataSourceUpdate(data) {
|
||||
return request({
|
||||
url: 'dataSource',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function reportDataSourceDetail(data) {
|
||||
return request({
|
||||
url: 'dataSource/' + data.id,
|
||||
method: 'get',
|
||||
params: { accessKey: data.accessKey }
|
||||
})
|
||||
}
|
||||
|
||||
export function testConnection (data) {
|
||||
return request({
|
||||
url: '/dataSource/testConnection',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export default { reportDataSourceList, reportDataSourceAdd, reportDataSourceDeleteBatch, reportDataSourceUpdate, reportDataSourceDetail, testConnection}
|
||||
66
src/api/reportShare.js
Normal file
@@ -0,0 +1,66 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function reportShareList(params) {
|
||||
return request({
|
||||
url: 'reportShare/pageList',
|
||||
method: 'GET',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
export function reportShareAdd(data) {
|
||||
return request({
|
||||
url: 'reportDashboard/share',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function excelShareAdd(data) {
|
||||
return request({
|
||||
url: 'reportExcel/share',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function reportShareDelay(data) {
|
||||
return request({
|
||||
url: 'reportShare/shareDelay',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function reportShareDeleteBatch(data) {
|
||||
return request({
|
||||
url: 'reportShare/delete/batch',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function reportShareUpdate(data) {
|
||||
return request({
|
||||
url: 'reportShare',
|
||||
method: 'put', data,
|
||||
})
|
||||
}
|
||||
|
||||
export function reportShareDetail(data) {
|
||||
return request({
|
||||
url: 'reportShare/' + data.id,
|
||||
method: 'get',
|
||||
params: {accessKey: data.accessKey}
|
||||
})
|
||||
}
|
||||
|
||||
export function reportShareDetailByCode(data) {
|
||||
return request({
|
||||
url: 'reportShare/detailByCode',
|
||||
method: 'get',
|
||||
params: {shareCode: data}
|
||||
})
|
||||
}
|
||||
|
||||
export default {reportShareList, reportShareAdd, reportShareDeleteBatch, reportShareUpdate, reportShareDetail}
|
||||
50
src/api/reportmanage.js
Normal file
@@ -0,0 +1,50 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function reportList(params) {
|
||||
return request({
|
||||
url: '/report/pageList',
|
||||
method: 'GET',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
export function reportAdd(data) {
|
||||
return request({
|
||||
url: '/report',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function reportDeleteBatch(data) {
|
||||
return request({
|
||||
url: '/report/delete/batch',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function reportUpdate(data) {
|
||||
return request({
|
||||
url: '/report',
|
||||
method: 'put', data,
|
||||
})
|
||||
}
|
||||
|
||||
export function reportDetail(data) {
|
||||
return request({
|
||||
url: '/report/' + data.id,
|
||||
method: 'get',
|
||||
params: { accessKey: data.accessKey }
|
||||
})
|
||||
}
|
||||
|
||||
export function reportCopy(data) {
|
||||
return request({
|
||||
url: '/report/copy',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { reportList, reportAdd, reportDeleteBatch, reportUpdate, reportDetail }
|
||||
70
src/api/upload.js
Normal file
@@ -0,0 +1,70 @@
|
||||
import axios from 'axios';
|
||||
import { Message, MessageBox } from 'element-ui';
|
||||
import { delItem } from '@/utils/storage';
|
||||
|
||||
axios.defaults.baseURL = process.env.BASE_API
|
||||
// axios.defaults.baseURL = 'http://10.108.12.23:8080' // 德明本地
|
||||
// axios.defaults.baseURL = "http://haitongnla.test.anji-plus.com"
|
||||
// axios.defaults.baseURL = "http://10.108.26.163:8080"
|
||||
|
||||
const service = axios.create({
|
||||
withCredentials: true,
|
||||
timeout: 60000,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
})
|
||||
|
||||
// response interceptor
|
||||
service.interceptors.response.use(
|
||||
response => {
|
||||
const res = response.data;
|
||||
if (res.repCode == '0000') {
|
||||
return res
|
||||
}
|
||||
else if (res.repCode == '0024') {
|
||||
|
||||
//登录超时或被登出,弹确认框,用户确认后,跳转到登录页面
|
||||
MessageBox({
|
||||
message: "当前登录已失效或异地登录,请重新登录",
|
||||
type: 'error',
|
||||
duration: 3 * 1000,
|
||||
}).then(() => {
|
||||
console.log(1)
|
||||
sessionStorage.clear();
|
||||
localStorage.clear();
|
||||
// location.reload();
|
||||
window.location.href = "/";
|
||||
}).catch(err => {
|
||||
console.log(2)
|
||||
})
|
||||
}else if(res.repCode == "3100" || res.repCode == "3101"){
|
||||
return res;
|
||||
}
|
||||
else {
|
||||
Message({
|
||||
message: res.repMsg,
|
||||
type: 'error',
|
||||
duration: 3 * 1000
|
||||
})
|
||||
return res;
|
||||
}
|
||||
},
|
||||
error => {
|
||||
var errorStatus = error.response.status;
|
||||
var errorData = error.response.data;
|
||||
var messageTxt = "";
|
||||
if (errorStatus != 200) {
|
||||
messageTxt = "服务器内部错误,请联系管理员";
|
||||
} else {
|
||||
messageTxt = '失败原因:' + errorData.repCode + '--' + errorData.repMsg;
|
||||
}
|
||||
Message({
|
||||
message: messageTxt,
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
export default service
|
||||
539
src/assets/iconfont/demo.css
Normal file
@@ -0,0 +1,539 @@
|
||||
/* Logo 字体 */
|
||||
@font-face {
|
||||
font-family: "iconfont logo";
|
||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
|
||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-family: "iconfont logo";
|
||||
font-size: 160px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* tabs */
|
||||
.nav-tabs {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nav-tabs .nav-more {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#tabs {
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
#tabs li {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
border-bottom: 2px solid transparent;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-bottom: -1px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
|
||||
#tabs .active {
|
||||
border-bottom-color: #f00;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.tab-container .content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 页面布局 */
|
||||
.main {
|
||||
padding: 30px 100px;
|
||||
width: 960px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.main .logo {
|
||||
color: #333;
|
||||
text-align: left;
|
||||
margin-bottom: 30px;
|
||||
line-height: 1;
|
||||
height: 110px;
|
||||
margin-top: -50px;
|
||||
overflow: hidden;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.main .logo a {
|
||||
font-size: 160px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.helps {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.helps pre {
|
||||
padding: 20px;
|
||||
margin: 10px 0;
|
||||
border: solid 1px #e7e1cd;
|
||||
background-color: #fffdef;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.icon_lists {
|
||||
width: 100% !important;
|
||||
overflow: hidden;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.icon_lists li {
|
||||
width: 100px;
|
||||
margin-bottom: 10px;
|
||||
margin-right: 20px;
|
||||
text-align: center;
|
||||
list-style: none !important;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.icon_lists li .code-name {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.icon_lists .icon {
|
||||
display: block;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
font-size: 42px;
|
||||
margin: 10px auto;
|
||||
color: #333;
|
||||
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
|
||||
-moz-transition: font-size 0.25s linear, width 0.25s linear;
|
||||
transition: font-size 0.25s linear, width 0.25s linear;
|
||||
}
|
||||
|
||||
.icon_lists .icon:hover {
|
||||
font-size: 100px;
|
||||
}
|
||||
|
||||
.icon_lists .svg-icon {
|
||||
/* 通过设置 font-size 来改变图标大小 */
|
||||
width: 1em;
|
||||
/* 图标和文字相邻时,垂直对齐 */
|
||||
vertical-align: -0.15em;
|
||||
/* 通过设置 color 来改变 SVG 的颜色/fill */
|
||||
fill: currentColor;
|
||||
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
|
||||
normalize.css 中也包含这行 */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.icon_lists li .name,
|
||||
.icon_lists li .code-name {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* markdown 样式 */
|
||||
.markdown {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.markdown img {
|
||||
vertical-align: middle;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.markdown h1 {
|
||||
color: #404040;
|
||||
font-weight: 500;
|
||||
line-height: 40px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.markdown h2,
|
||||
.markdown h3,
|
||||
.markdown h4,
|
||||
.markdown h5,
|
||||
.markdown h6 {
|
||||
color: #404040;
|
||||
margin: 1.6em 0 0.6em 0;
|
||||
font-weight: 500;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.markdown h1 {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.markdown h2 {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.markdown h3 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.markdown h4 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.markdown h5 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.markdown h6 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.markdown hr {
|
||||
height: 1px;
|
||||
border: 0;
|
||||
background: #e9e9e9;
|
||||
margin: 16px 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.markdown p {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.markdown>p,
|
||||
.markdown>blockquote,
|
||||
.markdown>.highlight,
|
||||
.markdown>ol,
|
||||
.markdown>ul {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.markdown ul>li {
|
||||
list-style: circle;
|
||||
}
|
||||
|
||||
.markdown>ul li,
|
||||
.markdown blockquote ul>li {
|
||||
margin-left: 20px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.markdown>ul li p,
|
||||
.markdown>ol li p {
|
||||
margin: 0.6em 0;
|
||||
}
|
||||
|
||||
.markdown ol>li {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
.markdown>ol li,
|
||||
.markdown blockquote ol>li {
|
||||
margin-left: 20px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.markdown code {
|
||||
margin: 0 3px;
|
||||
padding: 0 5px;
|
||||
background: #eee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.markdown strong,
|
||||
.markdown b {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown>table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0px;
|
||||
empty-cells: show;
|
||||
border: 1px solid #e9e9e9;
|
||||
width: 95%;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.markdown>table th {
|
||||
white-space: nowrap;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown>table th,
|
||||
.markdown>table td {
|
||||
border: 1px solid #e9e9e9;
|
||||
padding: 8px 16px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.markdown>table th {
|
||||
background: #F7F7F7;
|
||||
}
|
||||
|
||||
.markdown blockquote {
|
||||
font-size: 90%;
|
||||
color: #999;
|
||||
border-left: 4px solid #e9e9e9;
|
||||
padding-left: 0.8em;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.markdown blockquote p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.markdown .anchor {
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.markdown .waiting {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.markdown h1:hover .anchor,
|
||||
.markdown h2:hover .anchor,
|
||||
.markdown h3:hover .anchor,
|
||||
.markdown h4:hover .anchor,
|
||||
.markdown h5:hover .anchor,
|
||||
.markdown h6:hover .anchor {
|
||||
opacity: 1;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.markdown>br,
|
||||
.markdown>p>br {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
background: white;
|
||||
padding: 0.5em;
|
||||
color: #333333;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-meta {
|
||||
color: #969896;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-strong,
|
||||
.hljs-emphasis,
|
||||
.hljs-quote {
|
||||
color: #df5000;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-type {
|
||||
color: #a71d5d;
|
||||
}
|
||||
|
||||
.hljs-literal,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-attribute {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-name {
|
||||
color: #63a35c;
|
||||
}
|
||||
|
||||
.hljs-tag {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-attr,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #795da3;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
color: #55a532;
|
||||
background-color: #eaffea;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
color: #bd2c00;
|
||||
background-color: #ffecec;
|
||||
}
|
||||
|
||||
.hljs-link {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* 代码高亮 */
|
||||
/* PrismJS 1.15.0
|
||||
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
|
||||
/**
|
||||
* prism.js default theme for JavaScript, CSS and HTML
|
||||
* Based on dabblet (http://dabblet.com)
|
||||
* @author Lea Verou
|
||||
*/
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: black;
|
||||
background: none;
|
||||
text-shadow: 0 1px white;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection,
|
||||
pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection,
|
||||
code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre)>code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #f5f2f0;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre)>code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: slategray;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #905;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #690;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #9a6e3a;
|
||||
background: hsla(0, 0%, 100%, .5);
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #07a;
|
||||
}
|
||||
|
||||
.token.function,
|
||||
.token.class-name {
|
||||
color: #DD4A68;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: #e90;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
3040
src/assets/iconfont/demo_index.html
Normal file
511
src/assets/iconfont/iconfont.css
Normal file
@@ -0,0 +1,511 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 1513211 */
|
||||
src: url('iconfont.woff2?t=1666946350865') format('woff2'),
|
||||
url('iconfont.woff?t=1666946350865') format('woff'),
|
||||
url('iconfont.ttf?t=1666946350865') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.iconleidatu:before {
|
||||
content: "\e640";
|
||||
}
|
||||
|
||||
.iconrelitu:before {
|
||||
content: "\e683";
|
||||
}
|
||||
|
||||
.iconhuifubeifen:before {
|
||||
content: "\e60d";
|
||||
}
|
||||
|
||||
.iconundo:before {
|
||||
content: "\e60e";
|
||||
}
|
||||
|
||||
.iconciyuntu:before {
|
||||
content: "\e7af";
|
||||
}
|
||||
|
||||
.icondaochu:before {
|
||||
content: "\e618";
|
||||
}
|
||||
|
||||
.icondaoru:before {
|
||||
content: "\e608";
|
||||
}
|
||||
|
||||
.iconduibitupu:before {
|
||||
content: "\e9ca";
|
||||
}
|
||||
|
||||
.iconzhexian:before {
|
||||
content: "\e635";
|
||||
}
|
||||
|
||||
.iconbianzu23:before {
|
||||
content: "\e621";
|
||||
}
|
||||
|
||||
.iconduidietu:before {
|
||||
content: "\e61f";
|
||||
}
|
||||
|
||||
.iconfill_folder:before {
|
||||
content: "\e645";
|
||||
}
|
||||
|
||||
.iconzidianxiang:before {
|
||||
content: "\e7df";
|
||||
}
|
||||
|
||||
.iconAPIwangguan:before {
|
||||
content: "\e66b";
|
||||
}
|
||||
|
||||
.icondatabase:before {
|
||||
content: "\e7b6";
|
||||
}
|
||||
|
||||
.iconbaifenbi:before {
|
||||
content: "\e616";
|
||||
}
|
||||
|
||||
.iconfolder-o:before {
|
||||
content: "\e70f";
|
||||
}
|
||||
|
||||
.iconjinlingyingcaiwangtubiao01:before {
|
||||
content: "\e724";
|
||||
}
|
||||
|
||||
.iconleft-copy:before {
|
||||
content: "\e6af";
|
||||
}
|
||||
|
||||
.iconfuzhi1:before {
|
||||
content: "\e626";
|
||||
}
|
||||
|
||||
.iconzhongguoditu:before {
|
||||
content: "\e738";
|
||||
}
|
||||
|
||||
.iconbiaoge:before {
|
||||
content: "\e625";
|
||||
}
|
||||
|
||||
.icongexingzhuangban:before {
|
||||
content: "\e646";
|
||||
}
|
||||
|
||||
.iconyibiaopan-chaobiao:before {
|
||||
content: "\e72e";
|
||||
}
|
||||
|
||||
.iconnandinggeermeiguitu:before {
|
||||
content: "\e851";
|
||||
}
|
||||
|
||||
.iconzhankai:before {
|
||||
content: "\e631";
|
||||
}
|
||||
|
||||
.iconexcel:before {
|
||||
content: "\e650";
|
||||
}
|
||||
|
||||
.iconbaocun:before {
|
||||
content: "\e737";
|
||||
}
|
||||
|
||||
.iconguanbi:before {
|
||||
content: "\e6c5";
|
||||
}
|
||||
|
||||
.iconpdf:before {
|
||||
content: "\e614";
|
||||
}
|
||||
|
||||
.iconfuzhi:before {
|
||||
content: "\e61e";
|
||||
}
|
||||
|
||||
.icon020kongxinbingtu:before {
|
||||
content: "\e78c";
|
||||
}
|
||||
|
||||
.iconshijian:before {
|
||||
content: "\e662";
|
||||
}
|
||||
|
||||
.iconsave:before {
|
||||
content: "\e6f6";
|
||||
}
|
||||
|
||||
.icontupian:before {
|
||||
content: "\e612";
|
||||
}
|
||||
|
||||
.iconzhuzhuangtu:before {
|
||||
content: "\e691";
|
||||
}
|
||||
|
||||
.iconchaolianjie:before {
|
||||
content: "\e65f";
|
||||
}
|
||||
|
||||
.iconziyuan:before {
|
||||
content: "\e605";
|
||||
}
|
||||
|
||||
.iconshipin:before {
|
||||
content: "\ecc1";
|
||||
}
|
||||
|
||||
.iconkuangjia:before {
|
||||
content: "\e66a";
|
||||
}
|
||||
|
||||
.iconyulan:before {
|
||||
content: "\e728";
|
||||
}
|
||||
|
||||
.iconhengxiangwenzi:before {
|
||||
content: "\e601";
|
||||
}
|
||||
|
||||
.iconicon_tubiao_bingtu:before {
|
||||
content: "\e602";
|
||||
}
|
||||
|
||||
.iconloudoutu:before {
|
||||
content: "\e6d5";
|
||||
}
|
||||
|
||||
.icontubiaozhexiantu:before {
|
||||
content: "\e630";
|
||||
}
|
||||
|
||||
.iconzhuxiantu:before {
|
||||
content: "\e607";
|
||||
}
|
||||
|
||||
.icontupian1:before {
|
||||
content: "\e81d";
|
||||
}
|
||||
|
||||
.iconyibiaopan:before {
|
||||
content: "\e706";
|
||||
}
|
||||
|
||||
.icon1:before {
|
||||
content: "\e63b";
|
||||
}
|
||||
|
||||
.iconxiazai:before {
|
||||
content: "\e639";
|
||||
}
|
||||
|
||||
.icon11-04:before {
|
||||
content: "\e784";
|
||||
}
|
||||
|
||||
.iconyouxiang:before {
|
||||
content: "\e769";
|
||||
}
|
||||
|
||||
.iconbangdingshouji:before {
|
||||
content: "\e64d";
|
||||
}
|
||||
|
||||
.iconshouji:before {
|
||||
content: "\e854";
|
||||
}
|
||||
|
||||
.icon52-shouji:before {
|
||||
content: "\e871";
|
||||
}
|
||||
|
||||
.iconhome:before {
|
||||
content: "\e610";
|
||||
}
|
||||
|
||||
.iconhome2:before {
|
||||
content: "\e61a";
|
||||
}
|
||||
|
||||
.iconKafka:before {
|
||||
content: "\e65a";
|
||||
}
|
||||
|
||||
.iconshujujieruKafkajiqun:before {
|
||||
content: "\e64f";
|
||||
}
|
||||
|
||||
.iconkafka:before {
|
||||
content: "\e6f2";
|
||||
}
|
||||
|
||||
.iconelasticsearch-Elasticsearch:before {
|
||||
content: "\e853";
|
||||
}
|
||||
|
||||
.iconapachekafka:before {
|
||||
content: "\eb3f";
|
||||
}
|
||||
|
||||
.iconelasticsearch:before {
|
||||
content: "\eb85";
|
||||
}
|
||||
|
||||
.iconwentifankui:before {
|
||||
content: "\e8d1";
|
||||
}
|
||||
|
||||
.iconwentifankui1:before {
|
||||
content: "\e70e";
|
||||
}
|
||||
|
||||
.iconwentifankui2:before {
|
||||
content: "\e643";
|
||||
}
|
||||
|
||||
.iconalikafkaxiaoxiduilieKafka:before {
|
||||
content: "\e8a4";
|
||||
}
|
||||
|
||||
.iconxiangmuchaxun-chakanshebei:before {
|
||||
content: "\e682";
|
||||
}
|
||||
|
||||
.iconelasticsearchElasticsearch:before {
|
||||
content: "\e6a1";
|
||||
}
|
||||
|
||||
.icon511tongji_shutu:before {
|
||||
content: "\e64a";
|
||||
}
|
||||
|
||||
.iconfenxiang1:before {
|
||||
content: "\e615";
|
||||
}
|
||||
|
||||
.iconfenxiang2:before {
|
||||
content: "\e60f";
|
||||
}
|
||||
|
||||
.iconfenxiang_2:before {
|
||||
content: "\e600";
|
||||
}
|
||||
|
||||
.iconNMStubiao-:before {
|
||||
content: "\e628";
|
||||
}
|
||||
|
||||
.iconwanchenganquanshijian:before {
|
||||
content: "\e68a";
|
||||
}
|
||||
|
||||
.iconeventbridgexiaoxishijianzongxian:before {
|
||||
content: "\e74d";
|
||||
}
|
||||
|
||||
.iconshu:before {
|
||||
content: "\e629";
|
||||
}
|
||||
|
||||
.iconshebeiguanji:before {
|
||||
content: "\e61d";
|
||||
}
|
||||
|
||||
.iconhaofangtuo400iconfontduanxin:before {
|
||||
content: "\e6d8";
|
||||
}
|
||||
|
||||
.iconnavicon-ywcs:before {
|
||||
content: "\e661";
|
||||
}
|
||||
|
||||
.iconliebiao:before {
|
||||
content: "\e660";
|
||||
}
|
||||
|
||||
.iconbianji:before {
|
||||
content: "\e60c";
|
||||
}
|
||||
|
||||
.iconyoujian:before {
|
||||
content: "\e63a";
|
||||
}
|
||||
|
||||
.iconshejiaodingding:before {
|
||||
content: "\e678";
|
||||
}
|
||||
|
||||
.iconzidianguanli:before {
|
||||
content: "\e624";
|
||||
}
|
||||
|
||||
.icontubiao:before {
|
||||
content: "\e73f";
|
||||
}
|
||||
|
||||
.icondingding:before {
|
||||
content: "\e690";
|
||||
}
|
||||
|
||||
.iconduanxin:before {
|
||||
content: "\e603";
|
||||
}
|
||||
|
||||
.icondirectmailyoujiantuisong:before {
|
||||
content: "\e714";
|
||||
}
|
||||
|
||||
.iconshebeisheshi:before {
|
||||
content: "\e61c";
|
||||
}
|
||||
|
||||
.icontongzhi:before {
|
||||
content: "\e606";
|
||||
}
|
||||
|
||||
.iconrizhi:before {
|
||||
content: "\e663";
|
||||
}
|
||||
|
||||
.iconchufaqipeizhi-hui:before {
|
||||
content: "\e689";
|
||||
}
|
||||
|
||||
.iconvcsshijuejisuanfuwu:before {
|
||||
content: "\e759";
|
||||
}
|
||||
|
||||
.iconbar_icon_shebei:before {
|
||||
content: "\e60a";
|
||||
}
|
||||
|
||||
.iconuser-before:before {
|
||||
content: "\e617";
|
||||
}
|
||||
|
||||
.iconkemuweihutubiao:before {
|
||||
content: "\e60b";
|
||||
}
|
||||
|
||||
.iconaccounting-subjects:before {
|
||||
content: "\e677";
|
||||
}
|
||||
|
||||
.iconRectangleCopy:before {
|
||||
content: "\e6dd";
|
||||
}
|
||||
|
||||
.iconchengbenshujuguanli:before {
|
||||
content: "\e6c7";
|
||||
}
|
||||
|
||||
.iconjibenshuju:before {
|
||||
content: "\e71d";
|
||||
}
|
||||
|
||||
.iconB-shengshiqu:before {
|
||||
content: "\e72d";
|
||||
}
|
||||
|
||||
.iconzuzhijigou:before {
|
||||
content: "\e66e";
|
||||
}
|
||||
|
||||
.iconanniu:before {
|
||||
content: "\e8c5";
|
||||
}
|
||||
|
||||
.iconcaidan2:before {
|
||||
content: "\e61b";
|
||||
}
|
||||
|
||||
.iconwenhao:before {
|
||||
content: "\e67f";
|
||||
}
|
||||
|
||||
.iconlajitong:before {
|
||||
content: "\e636";
|
||||
}
|
||||
|
||||
.iconzhongzhimima:before {
|
||||
content: "\e620";
|
||||
}
|
||||
|
||||
.iconshezhi:before {
|
||||
content: "\e68f";
|
||||
}
|
||||
|
||||
.iconzhongzhuan:before {
|
||||
content: "\e69b";
|
||||
}
|
||||
|
||||
.iconadd:before {
|
||||
content: "\e6b9";
|
||||
}
|
||||
|
||||
.iconminus:before {
|
||||
content: "\e6ba";
|
||||
}
|
||||
|
||||
.iconpassword:before {
|
||||
content: "\e622";
|
||||
}
|
||||
|
||||
.iconyonghu:before {
|
||||
content: "\e604";
|
||||
}
|
||||
|
||||
.iconquanxian:before {
|
||||
content: "\e633";
|
||||
}
|
||||
|
||||
.iconjiaose1:before {
|
||||
content: "\e64c";
|
||||
}
|
||||
|
||||
.iconzidian:before {
|
||||
content: "\e716";
|
||||
}
|
||||
|
||||
.iconcssz:before {
|
||||
content: "\e672";
|
||||
}
|
||||
|
||||
.iconbianji1:before {
|
||||
content: "\e642";
|
||||
}
|
||||
|
||||
.icondfzq-:before {
|
||||
content: "\e609";
|
||||
}
|
||||
|
||||
.iconfenxiang:before {
|
||||
content: "\e641";
|
||||
}
|
||||
|
||||
.iconshouquan1:before {
|
||||
content: "\e634";
|
||||
}
|
||||
|
||||
.iconjiantou:before {
|
||||
content: "\e653";
|
||||
}
|
||||
|
||||
.iconjiantou-copy-copy:before {
|
||||
content: "\e654";
|
||||
}
|
||||
|
||||
1
src/assets/iconfont/iconfont.js
Normal file
877
src/assets/iconfont/iconfont.json
Normal file
@@ -0,0 +1,877 @@
|
||||
{
|
||||
"id": "1513211",
|
||||
"name": "基础权限",
|
||||
"font_family": "iconfont",
|
||||
"css_prefix_text": "icon",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "9013588",
|
||||
"name": "雷达图2",
|
||||
"font_class": "leidatu",
|
||||
"unicode": "e640",
|
||||
"unicode_decimal": 58944
|
||||
},
|
||||
{
|
||||
"icon_id": "19004935",
|
||||
"name": "热力图",
|
||||
"font_class": "relitu",
|
||||
"unicode": "e683",
|
||||
"unicode_decimal": 59011
|
||||
},
|
||||
{
|
||||
"icon_id": "15047024",
|
||||
"name": "恢复备份",
|
||||
"font_class": "huifubeifen",
|
||||
"unicode": "e60d",
|
||||
"unicode_decimal": 58893
|
||||
},
|
||||
{
|
||||
"icon_id": "19657550",
|
||||
"name": "撤销",
|
||||
"font_class": "undo",
|
||||
"unicode": "e60e",
|
||||
"unicode_decimal": 58894
|
||||
},
|
||||
{
|
||||
"icon_id": "23043843",
|
||||
"name": "词云图",
|
||||
"font_class": "ciyuntu",
|
||||
"unicode": "e7af",
|
||||
"unicode_decimal": 59311
|
||||
},
|
||||
{
|
||||
"icon_id": "14325372",
|
||||
"name": "导出",
|
||||
"font_class": "daochu",
|
||||
"unicode": "e618",
|
||||
"unicode_decimal": 58904
|
||||
},
|
||||
{
|
||||
"icon_id": "15040056",
|
||||
"name": "导入",
|
||||
"font_class": "daoru",
|
||||
"unicode": "e608",
|
||||
"unicode_decimal": 58888
|
||||
},
|
||||
{
|
||||
"icon_id": "18140536",
|
||||
"name": "对比图谱",
|
||||
"font_class": "duibitupu",
|
||||
"unicode": "e9ca",
|
||||
"unicode_decimal": 59850
|
||||
},
|
||||
{
|
||||
"icon_id": "23013771",
|
||||
"name": "折线",
|
||||
"font_class": "zhexian",
|
||||
"unicode": "e635",
|
||||
"unicode_decimal": 58933
|
||||
},
|
||||
{
|
||||
"icon_id": "18888301",
|
||||
"name": "堆叠图",
|
||||
"font_class": "bianzu23",
|
||||
"unicode": "e621",
|
||||
"unicode_decimal": 58913
|
||||
},
|
||||
{
|
||||
"icon_id": "23457042",
|
||||
"name": "堆叠图",
|
||||
"font_class": "duidietu",
|
||||
"unicode": "e61f",
|
||||
"unicode_decimal": 58911
|
||||
},
|
||||
{
|
||||
"icon_id": "5472881",
|
||||
"name": "文件",
|
||||
"font_class": "fill_folder",
|
||||
"unicode": "e645",
|
||||
"unicode_decimal": 58949
|
||||
},
|
||||
{
|
||||
"icon_id": "15994720",
|
||||
"name": "字典项",
|
||||
"font_class": "zidianxiang",
|
||||
"unicode": "e7df",
|
||||
"unicode_decimal": 59359
|
||||
},
|
||||
{
|
||||
"icon_id": "1364704",
|
||||
"name": "API网关",
|
||||
"font_class": "APIwangguan",
|
||||
"unicode": "e66b",
|
||||
"unicode_decimal": 58987
|
||||
},
|
||||
{
|
||||
"icon_id": "14341931",
|
||||
"name": "database",
|
||||
"font_class": "database",
|
||||
"unicode": "e7b6",
|
||||
"unicode_decimal": 59318
|
||||
},
|
||||
{
|
||||
"icon_id": "15338097",
|
||||
"name": "百分比",
|
||||
"font_class": "baifenbi",
|
||||
"unicode": "e616",
|
||||
"unicode_decimal": 58902
|
||||
},
|
||||
{
|
||||
"icon_id": "15461480",
|
||||
"name": "文件",
|
||||
"font_class": "folder-o",
|
||||
"unicode": "e70f",
|
||||
"unicode_decimal": 59151
|
||||
},
|
||||
{
|
||||
"icon_id": "182207",
|
||||
"name": "上",
|
||||
"font_class": "jinlingyingcaiwangtubiao01",
|
||||
"unicode": "e724",
|
||||
"unicode_decimal": 59172
|
||||
},
|
||||
{
|
||||
"icon_id": "2773923",
|
||||
"name": "下",
|
||||
"font_class": "left-copy",
|
||||
"unicode": "e6af",
|
||||
"unicode_decimal": 59055
|
||||
},
|
||||
{
|
||||
"icon_id": "4653465",
|
||||
"name": "复制",
|
||||
"font_class": "fuzhi1",
|
||||
"unicode": "e626",
|
||||
"unicode_decimal": 58918
|
||||
},
|
||||
{
|
||||
"icon_id": "22378736",
|
||||
"name": "中国地图",
|
||||
"font_class": "zhongguoditu",
|
||||
"unicode": "e738",
|
||||
"unicode_decimal": 59192
|
||||
},
|
||||
{
|
||||
"icon_id": "21338828",
|
||||
"name": "表格",
|
||||
"font_class": "biaoge",
|
||||
"unicode": "e625",
|
||||
"unicode_decimal": 58917
|
||||
},
|
||||
{
|
||||
"icon_id": "13087633",
|
||||
"name": "个性装扮",
|
||||
"font_class": "gexingzhuangban",
|
||||
"unicode": "e646",
|
||||
"unicode_decimal": 58950
|
||||
},
|
||||
{
|
||||
"icon_id": "16466332",
|
||||
"name": "仪表盘-抄表",
|
||||
"font_class": "yibiaopan-chaobiao",
|
||||
"unicode": "e72e",
|
||||
"unicode_decimal": 59182
|
||||
},
|
||||
{
|
||||
"icon_id": "15872322",
|
||||
"name": "南丁格尔玫瑰图",
|
||||
"font_class": "nandinggeermeiguitu",
|
||||
"unicode": "e851",
|
||||
"unicode_decimal": 59473
|
||||
},
|
||||
{
|
||||
"icon_id": "11990084",
|
||||
"name": "展 开 ",
|
||||
"font_class": "zhankai",
|
||||
"unicode": "e631",
|
||||
"unicode_decimal": 58929
|
||||
},
|
||||
{
|
||||
"icon_id": "1990758",
|
||||
"name": "excel",
|
||||
"font_class": "excel",
|
||||
"unicode": "e650",
|
||||
"unicode_decimal": 58960
|
||||
},
|
||||
{
|
||||
"icon_id": "9445573",
|
||||
"name": "保存",
|
||||
"font_class": "baocun",
|
||||
"unicode": "e737",
|
||||
"unicode_decimal": 59191
|
||||
},
|
||||
{
|
||||
"icon_id": "11920154",
|
||||
"name": "关 闭",
|
||||
"font_class": "guanbi",
|
||||
"unicode": "e6c5",
|
||||
"unicode_decimal": 59077
|
||||
},
|
||||
{
|
||||
"icon_id": "16968592",
|
||||
"name": "pdf",
|
||||
"font_class": "pdf",
|
||||
"unicode": "e614",
|
||||
"unicode_decimal": 58900
|
||||
},
|
||||
{
|
||||
"icon_id": "21538118",
|
||||
"name": "复制",
|
||||
"font_class": "fuzhi",
|
||||
"unicode": "e61e",
|
||||
"unicode_decimal": 58910
|
||||
},
|
||||
{
|
||||
"icon_id": "1066041",
|
||||
"name": "020空心饼图",
|
||||
"font_class": "020kongxinbingtu",
|
||||
"unicode": "e78c",
|
||||
"unicode_decimal": 59276
|
||||
},
|
||||
{
|
||||
"icon_id": "2032219",
|
||||
"name": "时间",
|
||||
"font_class": "shijian",
|
||||
"unicode": "e662",
|
||||
"unicode_decimal": 58978
|
||||
},
|
||||
{
|
||||
"icon_id": "2721664",
|
||||
"name": "保存",
|
||||
"font_class": "save",
|
||||
"unicode": "e6f6",
|
||||
"unicode_decimal": 59126
|
||||
},
|
||||
{
|
||||
"icon_id": "4803230",
|
||||
"name": "图片",
|
||||
"font_class": "tupian",
|
||||
"unicode": "e612",
|
||||
"unicode_decimal": 58898
|
||||
},
|
||||
{
|
||||
"icon_id": "5963559",
|
||||
"name": "柱状图",
|
||||
"font_class": "zhuzhuangtu",
|
||||
"unicode": "e691",
|
||||
"unicode_decimal": 59025
|
||||
},
|
||||
{
|
||||
"icon_id": "6642296",
|
||||
"name": "超链接",
|
||||
"font_class": "chaolianjie",
|
||||
"unicode": "e65f",
|
||||
"unicode_decimal": 58975
|
||||
},
|
||||
{
|
||||
"icon_id": "7732218",
|
||||
"name": "文本",
|
||||
"font_class": "ziyuan",
|
||||
"unicode": "e605",
|
||||
"unicode_decimal": 58885
|
||||
},
|
||||
{
|
||||
"icon_id": "9592086",
|
||||
"name": "视频",
|
||||
"font_class": "shipin",
|
||||
"unicode": "ecc1",
|
||||
"unicode_decimal": 60609
|
||||
},
|
||||
{
|
||||
"icon_id": "12252496",
|
||||
"name": "框架",
|
||||
"font_class": "kuangjia",
|
||||
"unicode": "e66a",
|
||||
"unicode_decimal": 58986
|
||||
},
|
||||
{
|
||||
"icon_id": "14717060",
|
||||
"name": "预览",
|
||||
"font_class": "yulan",
|
||||
"unicode": "e728",
|
||||
"unicode_decimal": 59176
|
||||
},
|
||||
{
|
||||
"icon_id": "14728974",
|
||||
"name": "横向文字",
|
||||
"font_class": "hengxiangwenzi",
|
||||
"unicode": "e601",
|
||||
"unicode_decimal": 58881
|
||||
},
|
||||
{
|
||||
"icon_id": "15066193",
|
||||
"name": "图表 _饼图",
|
||||
"font_class": "icon_tubiao_bingtu",
|
||||
"unicode": "e602",
|
||||
"unicode_decimal": 58882
|
||||
},
|
||||
{
|
||||
"icon_id": "17247792",
|
||||
"name": "漏斗图",
|
||||
"font_class": "loudoutu",
|
||||
"unicode": "e6d5",
|
||||
"unicode_decimal": 59093
|
||||
},
|
||||
{
|
||||
"icon_id": "21925168",
|
||||
"name": "图表 折线图",
|
||||
"font_class": "tubiaozhexiantu",
|
||||
"unicode": "e630",
|
||||
"unicode_decimal": 58928
|
||||
},
|
||||
{
|
||||
"icon_id": "22117888",
|
||||
"name": "柱线图",
|
||||
"font_class": "zhuxiantu",
|
||||
"unicode": "e607",
|
||||
"unicode_decimal": 58887
|
||||
},
|
||||
{
|
||||
"icon_id": "22300259",
|
||||
"name": "图片",
|
||||
"font_class": "tupian1",
|
||||
"unicode": "e81d",
|
||||
"unicode_decimal": 59421
|
||||
},
|
||||
{
|
||||
"icon_id": "22398839",
|
||||
"name": "仪表盘",
|
||||
"font_class": "yibiaopan",
|
||||
"unicode": "e706",
|
||||
"unicode_decimal": 59142
|
||||
},
|
||||
{
|
||||
"icon_id": "18774317",
|
||||
"name": "返回",
|
||||
"font_class": "1",
|
||||
"unicode": "e63b",
|
||||
"unicode_decimal": 58939
|
||||
},
|
||||
{
|
||||
"icon_id": "5388367",
|
||||
"name": "下载",
|
||||
"font_class": "xiazai",
|
||||
"unicode": "e639",
|
||||
"unicode_decimal": 58937
|
||||
},
|
||||
{
|
||||
"icon_id": "14245657",
|
||||
"name": "下载",
|
||||
"font_class": "11-04",
|
||||
"unicode": "e784",
|
||||
"unicode_decimal": 59268
|
||||
},
|
||||
{
|
||||
"icon_id": "4933441",
|
||||
"name": "邮箱",
|
||||
"font_class": "youxiang",
|
||||
"unicode": "e769",
|
||||
"unicode_decimal": 59241
|
||||
},
|
||||
{
|
||||
"icon_id": "7140630",
|
||||
"name": "绑定手机",
|
||||
"font_class": "bangdingshouji",
|
||||
"unicode": "e64d",
|
||||
"unicode_decimal": 58957
|
||||
},
|
||||
{
|
||||
"icon_id": "8288872",
|
||||
"name": "手机",
|
||||
"font_class": "shouji",
|
||||
"unicode": "e854",
|
||||
"unicode_decimal": 59476
|
||||
},
|
||||
{
|
||||
"icon_id": "16218102",
|
||||
"name": "52-手机",
|
||||
"font_class": "52-shouji",
|
||||
"unicode": "e871",
|
||||
"unicode_decimal": 59505
|
||||
},
|
||||
{
|
||||
"icon_id": "684484",
|
||||
"name": "home",
|
||||
"font_class": "home",
|
||||
"unicode": "e610",
|
||||
"unicode_decimal": 58896
|
||||
},
|
||||
{
|
||||
"icon_id": "7165766",
|
||||
"name": "home",
|
||||
"font_class": "home2",
|
||||
"unicode": "e61a",
|
||||
"unicode_decimal": 58906
|
||||
},
|
||||
{
|
||||
"icon_id": "981325",
|
||||
"name": "Kafka",
|
||||
"font_class": "Kafka",
|
||||
"unicode": "e65a",
|
||||
"unicode_decimal": 58970
|
||||
},
|
||||
{
|
||||
"icon_id": "4772840",
|
||||
"name": "数据接入—Kafka集群",
|
||||
"font_class": "shujujieruKafkajiqun",
|
||||
"unicode": "e64f",
|
||||
"unicode_decimal": 58959
|
||||
},
|
||||
{
|
||||
"icon_id": "8691927",
|
||||
"name": "kafka",
|
||||
"font_class": "kafka",
|
||||
"unicode": "e6f2",
|
||||
"unicode_decimal": 59122
|
||||
},
|
||||
{
|
||||
"icon_id": "13140799",
|
||||
"name": "elasticsearch-Elasticsearch",
|
||||
"font_class": "elasticsearch-Elasticsearch",
|
||||
"unicode": "e853",
|
||||
"unicode_decimal": 59475
|
||||
},
|
||||
{
|
||||
"icon_id": "15378137",
|
||||
"name": "apachekafka",
|
||||
"font_class": "apachekafka",
|
||||
"unicode": "eb3f",
|
||||
"unicode_decimal": 60223
|
||||
},
|
||||
{
|
||||
"icon_id": "15378319",
|
||||
"name": "elasticsearch",
|
||||
"font_class": "elasticsearch",
|
||||
"unicode": "eb85",
|
||||
"unicode_decimal": 60293
|
||||
},
|
||||
{
|
||||
"icon_id": "3253279",
|
||||
"name": "问题反馈",
|
||||
"font_class": "wentifankui",
|
||||
"unicode": "e8d1",
|
||||
"unicode_decimal": 59601
|
||||
},
|
||||
{
|
||||
"icon_id": "3922909",
|
||||
"name": "问题反馈",
|
||||
"font_class": "wentifankui1",
|
||||
"unicode": "e70e",
|
||||
"unicode_decimal": 59150
|
||||
},
|
||||
{
|
||||
"icon_id": "13177275",
|
||||
"name": "问题反馈",
|
||||
"font_class": "wentifankui2",
|
||||
"unicode": "e643",
|
||||
"unicode_decimal": 58947
|
||||
},
|
||||
{
|
||||
"icon_id": "5583350",
|
||||
"name": "alikafka 消息队列Kafka",
|
||||
"font_class": "alikafkaxiaoxiduilieKafka",
|
||||
"unicode": "e8a4",
|
||||
"unicode_decimal": 59556
|
||||
},
|
||||
{
|
||||
"icon_id": "11033199",
|
||||
"name": "项目查询-查看设备",
|
||||
"font_class": "xiangmuchaxun-chakanshebei",
|
||||
"unicode": "e682",
|
||||
"unicode_decimal": 59010
|
||||
},
|
||||
{
|
||||
"icon_id": "13543355",
|
||||
"name": "elasticsearch Elasticsearch",
|
||||
"font_class": "elasticsearchElasticsearch",
|
||||
"unicode": "e6a1",
|
||||
"unicode_decimal": 59041
|
||||
},
|
||||
{
|
||||
"icon_id": "1308482",
|
||||
"name": "511统计_树图",
|
||||
"font_class": "511tongji_shutu",
|
||||
"unicode": "e64a",
|
||||
"unicode_decimal": 58954
|
||||
},
|
||||
{
|
||||
"icon_id": "8084555",
|
||||
"name": "分享",
|
||||
"font_class": "fenxiang1",
|
||||
"unicode": "e615",
|
||||
"unicode_decimal": 58901
|
||||
},
|
||||
{
|
||||
"icon_id": "9148583",
|
||||
"name": "分享",
|
||||
"font_class": "fenxiang2",
|
||||
"unicode": "e60f",
|
||||
"unicode_decimal": 58895
|
||||
},
|
||||
{
|
||||
"icon_id": "9810108",
|
||||
"name": "分享",
|
||||
"font_class": "fenxiang_2",
|
||||
"unicode": "e600",
|
||||
"unicode_decimal": 58880
|
||||
},
|
||||
{
|
||||
"icon_id": "10064575",
|
||||
"name": "告警-紧急",
|
||||
"font_class": "NMStubiao-",
|
||||
"unicode": "e628",
|
||||
"unicode_decimal": 58920
|
||||
},
|
||||
{
|
||||
"icon_id": "13186637",
|
||||
"name": "完成安全事件",
|
||||
"font_class": "wanchenganquanshijian",
|
||||
"unicode": "e68a",
|
||||
"unicode_decimal": 59018
|
||||
},
|
||||
{
|
||||
"icon_id": "14772380",
|
||||
"name": "eventbridge 消息事件总线",
|
||||
"font_class": "eventbridgexiaoxishijianzongxian",
|
||||
"unicode": "e74d",
|
||||
"unicode_decimal": 59213
|
||||
},
|
||||
{
|
||||
"icon_id": "16852593",
|
||||
"name": "树",
|
||||
"font_class": "shu",
|
||||
"unicode": "e629",
|
||||
"unicode_decimal": 58921
|
||||
},
|
||||
{
|
||||
"icon_id": "16800949",
|
||||
"name": "设备关机",
|
||||
"font_class": "shebeiguanji",
|
||||
"unicode": "e61d",
|
||||
"unicode_decimal": 58909
|
||||
},
|
||||
{
|
||||
"icon_id": "1111782",
|
||||
"name": "好房拓 4.0.0 iconfont_短信",
|
||||
"font_class": "haofangtuo400iconfontduanxin",
|
||||
"unicode": "e6d8",
|
||||
"unicode_decimal": 59096
|
||||
},
|
||||
{
|
||||
"icon_id": "3703026",
|
||||
"name": "业务参数",
|
||||
"font_class": "navicon-ywcs",
|
||||
"unicode": "e661",
|
||||
"unicode_decimal": 58977
|
||||
},
|
||||
{
|
||||
"icon_id": "3851361",
|
||||
"name": "列表",
|
||||
"font_class": "liebiao",
|
||||
"unicode": "e660",
|
||||
"unicode_decimal": 58976
|
||||
},
|
||||
{
|
||||
"icon_id": "3858850",
|
||||
"name": "编辑",
|
||||
"font_class": "bianji",
|
||||
"unicode": "e60c",
|
||||
"unicode_decimal": 58892
|
||||
},
|
||||
{
|
||||
"icon_id": "5203312",
|
||||
"name": "邮件",
|
||||
"font_class": "youjian",
|
||||
"unicode": "e63a",
|
||||
"unicode_decimal": 58938
|
||||
},
|
||||
{
|
||||
"icon_id": "5321887",
|
||||
"name": "社交钉钉",
|
||||
"font_class": "shejiaodingding",
|
||||
"unicode": "e678",
|
||||
"unicode_decimal": 59000
|
||||
},
|
||||
{
|
||||
"icon_id": "6627754",
|
||||
"name": "字典管理",
|
||||
"font_class": "zidianguanli",
|
||||
"unicode": "e624",
|
||||
"unicode_decimal": 58916
|
||||
},
|
||||
{
|
||||
"icon_id": "7092362",
|
||||
"name": "图表",
|
||||
"font_class": "tubiao",
|
||||
"unicode": "e73f",
|
||||
"unicode_decimal": 59199
|
||||
},
|
||||
{
|
||||
"icon_id": "9307592",
|
||||
"name": "钉钉",
|
||||
"font_class": "dingding",
|
||||
"unicode": "e690",
|
||||
"unicode_decimal": 59024
|
||||
},
|
||||
{
|
||||
"icon_id": "10392609",
|
||||
"name": "短信",
|
||||
"font_class": "duanxin",
|
||||
"unicode": "e603",
|
||||
"unicode_decimal": 58883
|
||||
},
|
||||
{
|
||||
"icon_id": "13592918",
|
||||
"name": "directmail 邮件推送",
|
||||
"font_class": "directmailyoujiantuisong",
|
||||
"unicode": "e714",
|
||||
"unicode_decimal": 59156
|
||||
},
|
||||
{
|
||||
"icon_id": "16589013",
|
||||
"name": "设备设施",
|
||||
"font_class": "shebeisheshi",
|
||||
"unicode": "e61c",
|
||||
"unicode_decimal": 58908
|
||||
},
|
||||
{
|
||||
"icon_id": "6249282",
|
||||
"name": "通知",
|
||||
"font_class": "tongzhi",
|
||||
"unicode": "e606",
|
||||
"unicode_decimal": 58886
|
||||
},
|
||||
{
|
||||
"icon_id": "7450630",
|
||||
"name": "日志",
|
||||
"font_class": "rizhi",
|
||||
"unicode": "e663",
|
||||
"unicode_decimal": 58979
|
||||
},
|
||||
{
|
||||
"icon_id": "11103449",
|
||||
"name": "触发器配置-灰",
|
||||
"font_class": "chufaqipeizhi-hui",
|
||||
"unicode": "e689",
|
||||
"unicode_decimal": 59017
|
||||
},
|
||||
{
|
||||
"icon_id": "17566612",
|
||||
"name": "vcs 视觉计算服务",
|
||||
"font_class": "vcsshijuejisuanfuwu",
|
||||
"unicode": "e759",
|
||||
"unicode_decimal": 59225
|
||||
},
|
||||
{
|
||||
"icon_id": "17755673",
|
||||
"name": "设备",
|
||||
"font_class": "bar_icon_shebei",
|
||||
"unicode": "e60a",
|
||||
"unicode_decimal": 58890
|
||||
},
|
||||
{
|
||||
"icon_id": "1327507",
|
||||
"name": "user-before",
|
||||
"font_class": "user-before",
|
||||
"unicode": "e617",
|
||||
"unicode_decimal": 58903
|
||||
},
|
||||
{
|
||||
"icon_id": "12353050",
|
||||
"name": "科目维护图标",
|
||||
"font_class": "kemuweihutubiao",
|
||||
"unicode": "e60b",
|
||||
"unicode_decimal": 58891
|
||||
},
|
||||
{
|
||||
"icon_id": "2152435",
|
||||
"name": "会计科目维护",
|
||||
"font_class": "accounting-subjects",
|
||||
"unicode": "e677",
|
||||
"unicode_decimal": 58999
|
||||
},
|
||||
{
|
||||
"icon_id": "7553622",
|
||||
"name": "成本查询",
|
||||
"font_class": "RectangleCopy",
|
||||
"unicode": "e6dd",
|
||||
"unicode_decimal": 59101
|
||||
},
|
||||
{
|
||||
"icon_id": "12453907",
|
||||
"name": "成本数据管理",
|
||||
"font_class": "chengbenshujuguanli",
|
||||
"unicode": "e6c7",
|
||||
"unicode_decimal": 59079
|
||||
},
|
||||
{
|
||||
"icon_id": "13745309",
|
||||
"name": "基本数据",
|
||||
"font_class": "jibenshuju",
|
||||
"unicode": "e71d",
|
||||
"unicode_decimal": 59165
|
||||
},
|
||||
{
|
||||
"icon_id": "7193675",
|
||||
"name": "B-省市区",
|
||||
"font_class": "B-shengshiqu",
|
||||
"unicode": "e72d",
|
||||
"unicode_decimal": 59181
|
||||
},
|
||||
{
|
||||
"icon_id": "16065650",
|
||||
"name": "组织机构",
|
||||
"font_class": "zuzhijigou",
|
||||
"unicode": "e66e",
|
||||
"unicode_decimal": 58990
|
||||
},
|
||||
{
|
||||
"icon_id": "10885920",
|
||||
"name": "按钮",
|
||||
"font_class": "anniu",
|
||||
"unicode": "e8c5",
|
||||
"unicode_decimal": 59589
|
||||
},
|
||||
{
|
||||
"icon_id": "7588087",
|
||||
"name": "菜单",
|
||||
"font_class": "caidan2",
|
||||
"unicode": "e61b",
|
||||
"unicode_decimal": 58907
|
||||
},
|
||||
{
|
||||
"icon_id": "343234",
|
||||
"name": "问号",
|
||||
"font_class": "wenhao",
|
||||
"unicode": "e67f",
|
||||
"unicode_decimal": 59007
|
||||
},
|
||||
{
|
||||
"icon_id": "485800",
|
||||
"name": "垃圾桶",
|
||||
"font_class": "lajitong",
|
||||
"unicode": "e636",
|
||||
"unicode_decimal": 58934
|
||||
},
|
||||
{
|
||||
"icon_id": "524416",
|
||||
"name": "重置密码",
|
||||
"font_class": "zhongzhimima",
|
||||
"unicode": "e620",
|
||||
"unicode_decimal": 58912
|
||||
},
|
||||
{
|
||||
"icon_id": "666885",
|
||||
"name": "设置",
|
||||
"font_class": "shezhi",
|
||||
"unicode": "e68f",
|
||||
"unicode_decimal": 59023
|
||||
},
|
||||
{
|
||||
"icon_id": "666902",
|
||||
"name": "中转",
|
||||
"font_class": "zhongzhuan",
|
||||
"unicode": "e69b",
|
||||
"unicode_decimal": 59035
|
||||
},
|
||||
{
|
||||
"icon_id": "1226780",
|
||||
"name": "add",
|
||||
"font_class": "add",
|
||||
"unicode": "e6b9",
|
||||
"unicode_decimal": 59065
|
||||
},
|
||||
{
|
||||
"icon_id": "1226781",
|
||||
"name": "minus",
|
||||
"font_class": "minus",
|
||||
"unicode": "e6ba",
|
||||
"unicode_decimal": 59066
|
||||
},
|
||||
{
|
||||
"icon_id": "1388130",
|
||||
"name": "password",
|
||||
"font_class": "password",
|
||||
"unicode": "e622",
|
||||
"unicode_decimal": 58914
|
||||
},
|
||||
{
|
||||
"icon_id": "1824319",
|
||||
"name": "用户",
|
||||
"font_class": "yonghu",
|
||||
"unicode": "e604",
|
||||
"unicode_decimal": 58884
|
||||
},
|
||||
{
|
||||
"icon_id": "2881221",
|
||||
"name": "权限",
|
||||
"font_class": "quanxian",
|
||||
"unicode": "e633",
|
||||
"unicode_decimal": 58931
|
||||
},
|
||||
{
|
||||
"icon_id": "3280236",
|
||||
"name": "角色",
|
||||
"font_class": "jiaose1",
|
||||
"unicode": "e64c",
|
||||
"unicode_decimal": 58956
|
||||
},
|
||||
{
|
||||
"icon_id": "3299246",
|
||||
"name": "字典",
|
||||
"font_class": "zidian",
|
||||
"unicode": "e716",
|
||||
"unicode_decimal": 59158
|
||||
},
|
||||
{
|
||||
"icon_id": "4374688",
|
||||
"name": "参数设置",
|
||||
"font_class": "cssz",
|
||||
"unicode": "e672",
|
||||
"unicode_decimal": 58994
|
||||
},
|
||||
{
|
||||
"icon_id": "4880425",
|
||||
"name": "编辑",
|
||||
"font_class": "bianji1",
|
||||
"unicode": "e642",
|
||||
"unicode_decimal": 58946
|
||||
},
|
||||
{
|
||||
"icon_id": "5472800",
|
||||
"name": "用户权限",
|
||||
"font_class": "dfzq-",
|
||||
"unicode": "e609",
|
||||
"unicode_decimal": 58889
|
||||
},
|
||||
{
|
||||
"icon_id": "6693043",
|
||||
"name": "分享",
|
||||
"font_class": "fenxiang",
|
||||
"unicode": "e641",
|
||||
"unicode_decimal": 58945
|
||||
},
|
||||
{
|
||||
"icon_id": "10213484",
|
||||
"name": "授权",
|
||||
"font_class": "shouquan1",
|
||||
"unicode": "e634",
|
||||
"unicode_decimal": 58932
|
||||
},
|
||||
{
|
||||
"icon_id": "13416544",
|
||||
"name": "左箭头",
|
||||
"font_class": "jiantou",
|
||||
"unicode": "e653",
|
||||
"unicode_decimal": 58963
|
||||
},
|
||||
{
|
||||
"icon_id": "13416596",
|
||||
"name": "左箭头",
|
||||
"font_class": "jiantou-copy-copy",
|
||||
"unicode": "e654",
|
||||
"unicode_decimal": 58964
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
src/assets/iconfont/iconfont.ttf
Normal file
BIN
src/assets/iconfont/iconfont.woff
Normal file
BIN
src/assets/iconfont/iconfont.woff2
Normal file
BIN
src/assets/images/404/404.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
src/assets/images/404/404_cloud.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
src/assets/images/apache.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/images/banner1.png
Normal file
|
After Width: | Height: | Size: 181 KiB |
BIN
src/assets/images/bianzu.png
Normal file
|
After Width: | Height: | Size: 859 B |
BIN
src/assets/images/charts.jpg
Normal file
|
After Width: | Height: | Size: 221 KiB |
BIN
src/assets/images/close.png
Normal file
|
After Width: | Height: | Size: 297 B |
BIN
src/assets/images/editor.png
Normal file
|
After Width: | Height: | Size: 727 B |
BIN
src/assets/images/home-logo.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/images/login.jpg
Normal file
|
After Width: | Height: | Size: 163 KiB |
BIN
src/assets/images/login.png
Normal file
|
After Width: | Height: | Size: 2.0 MiB |
BIN
src/assets/images/qrcode.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/assets/images/rightIcon.png
Normal file
|
After Width: | Height: | Size: 821 B |
BIN
src/assets/images/tiaoxingma.png
Normal file
|
After Width: | Height: | Size: 940 B |
BIN
src/assets/images/user/appro.png
Normal file
|
After Width: | Height: | Size: 778 B |
BIN
src/assets/images/user/appro2.png
Normal file
|
After Width: | Height: | Size: 300 KiB |
BIN
src/assets/images/user/avatar.gif
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
103310
src/assets/map/china.json
Normal file
14357
src/assets/map/上海市.json
Normal file
21493
src/assets/map/云南省.json
Normal file
13685
src/assets/map/内蒙古自治区.json
Normal file
17469
src/assets/map/北京市.json
Normal file
761
src/assets/map/台湾省.json
Normal file
@@ -0,0 +1,761 @@
|
||||
{
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"adcode": 710000,
|
||||
"name": "台湾省",
|
||||
"center": [
|
||||
121.509062,
|
||||
25.044332
|
||||
],
|
||||
"centroid": [
|
||||
120.971485,
|
||||
23.749452
|
||||
],
|
||||
"childrenNum": 0,
|
||||
"level": "province",
|
||||
"acroutes": [
|
||||
100000
|
||||
],
|
||||
"parent": {
|
||||
"adcode": 100000
|
||||
}
|
||||
},
|
||||
"geometry": {
|
||||
"type": "MultiPolygon",
|
||||
"coordinates": [
|
||||
[
|
||||
[
|
||||
[
|
||||
120.443558,
|
||||
22.441245
|
||||
],
|
||||
[
|
||||
120.517584,
|
||||
22.408536
|
||||
],
|
||||
[
|
||||
120.569903,
|
||||
22.361728
|
||||
],
|
||||
[
|
||||
120.640505,
|
||||
22.241347
|
||||
],
|
||||
[
|
||||
120.659209,
|
||||
22.15432
|
||||
],
|
||||
[
|
||||
120.662001,
|
||||
22.066983
|
||||
],
|
||||
[
|
||||
120.651464,
|
||||
22.033165
|
||||
],
|
||||
[
|
||||
120.667691,
|
||||
21.983168
|
||||
],
|
||||
[
|
||||
120.70157,
|
||||
21.927065
|
||||
],
|
||||
[
|
||||
120.743246,
|
||||
21.915569
|
||||
],
|
||||
[
|
||||
120.78155,
|
||||
21.923957
|
||||
],
|
||||
[
|
||||
120.85468,
|
||||
21.883333
|
||||
],
|
||||
[
|
||||
120.87291,
|
||||
21.897387
|
||||
],
|
||||
[
|
||||
120.866482,
|
||||
21.98436
|
||||
],
|
||||
[
|
||||
120.907315,
|
||||
22.033208
|
||||
],
|
||||
[
|
||||
120.904154,
|
||||
22.119757
|
||||
],
|
||||
[
|
||||
120.914955,
|
||||
22.302718
|
||||
],
|
||||
[
|
||||
120.981658,
|
||||
22.528305
|
||||
],
|
||||
[
|
||||
121.015009,
|
||||
22.584168
|
||||
],
|
||||
[
|
||||
121.033292,
|
||||
22.650725
|
||||
],
|
||||
[
|
||||
121.078498,
|
||||
22.669656
|
||||
],
|
||||
[
|
||||
121.170544,
|
||||
22.723133
|
||||
],
|
||||
[
|
||||
121.210481,
|
||||
22.770665
|
||||
],
|
||||
[
|
||||
121.237931,
|
||||
22.836327
|
||||
],
|
||||
[
|
||||
121.324708,
|
||||
22.945666
|
||||
],
|
||||
[
|
||||
121.354687,
|
||||
23.01006
|
||||
],
|
||||
[
|
||||
121.370388,
|
||||
23.084347
|
||||
],
|
||||
[
|
||||
121.409535,
|
||||
23.102669
|
||||
],
|
||||
[
|
||||
121.430294,
|
||||
23.137196
|
||||
],
|
||||
[
|
||||
121.415015,
|
||||
23.195973
|
||||
],
|
||||
[
|
||||
121.440358,
|
||||
23.272096
|
||||
],
|
||||
[
|
||||
121.479558,
|
||||
23.3223
|
||||
],
|
||||
[
|
||||
121.497788,
|
||||
23.419789
|
||||
],
|
||||
[
|
||||
121.521497,
|
||||
23.483198
|
||||
],
|
||||
[
|
||||
121.523078,
|
||||
23.538708
|
||||
],
|
||||
[
|
||||
121.587778,
|
||||
23.76102
|
||||
],
|
||||
[
|
||||
121.621604,
|
||||
23.92075
|
||||
],
|
||||
[
|
||||
121.659381,
|
||||
24.006893
|
||||
],
|
||||
[
|
||||
121.639992,
|
||||
24.064276
|
||||
],
|
||||
[
|
||||
121.643838,
|
||||
24.097713
|
||||
],
|
||||
[
|
||||
121.678085,
|
||||
24.133906
|
||||
],
|
||||
[
|
||||
121.689044,
|
||||
24.174401
|
||||
],
|
||||
[
|
||||
121.809172,
|
||||
24.339055
|
||||
],
|
||||
[
|
||||
121.826717,
|
||||
24.423579
|
||||
],
|
||||
[
|
||||
121.867498,
|
||||
24.478978
|
||||
],
|
||||
[
|
||||
121.885464,
|
||||
24.529677
|
||||
],
|
||||
[
|
||||
121.892524,
|
||||
24.617912
|
||||
],
|
||||
[
|
||||
121.862598,
|
||||
24.671515
|
||||
],
|
||||
[
|
||||
121.837993,
|
||||
24.76015
|
||||
],
|
||||
[
|
||||
121.845053,
|
||||
24.836269
|
||||
],
|
||||
[
|
||||
121.932883,
|
||||
24.938645
|
||||
],
|
||||
[
|
||||
122.012178,
|
||||
25.001469
|
||||
],
|
||||
[
|
||||
121.980776,
|
||||
25.03079
|
||||
],
|
||||
[
|
||||
121.947425,
|
||||
25.031955
|
||||
],
|
||||
[
|
||||
121.917077,
|
||||
25.137908
|
||||
],
|
||||
[
|
||||
121.842155,
|
||||
25.135332
|
||||
],
|
||||
[
|
||||
121.782407,
|
||||
25.160425
|
||||
],
|
||||
[
|
||||
121.750531,
|
||||
25.160716
|
||||
],
|
||||
[
|
||||
121.707327,
|
||||
25.191493
|
||||
],
|
||||
[
|
||||
121.700319,
|
||||
25.226913
|
||||
],
|
||||
[
|
||||
121.655324,
|
||||
25.241859
|
||||
],
|
||||
[
|
||||
121.623026,
|
||||
25.294694
|
||||
],
|
||||
[
|
||||
121.584986,
|
||||
25.308926
|
||||
],
|
||||
[
|
||||
121.535038,
|
||||
25.307515
|
||||
],
|
||||
[
|
||||
121.444415,
|
||||
25.270624
|
||||
],
|
||||
[
|
||||
121.413487,
|
||||
25.238912
|
||||
],
|
||||
[
|
||||
121.371864,
|
||||
25.159885
|
||||
],
|
||||
[
|
||||
121.319281,
|
||||
25.140691
|
||||
],
|
||||
[
|
||||
121.209322,
|
||||
25.127104
|
||||
],
|
||||
[
|
||||
121.133135,
|
||||
25.078728
|
||||
],
|
||||
[
|
||||
121.102102,
|
||||
25.075153
|
||||
],
|
||||
[
|
||||
121.024704,
|
||||
25.040479
|
||||
],
|
||||
[
|
||||
121.009688,
|
||||
24.993649
|
||||
],
|
||||
[
|
||||
120.960899,
|
||||
24.940227
|
||||
],
|
||||
[
|
||||
120.908475,
|
||||
24.852012
|
||||
],
|
||||
[
|
||||
120.892299,
|
||||
24.767526
|
||||
],
|
||||
[
|
||||
120.823753,
|
||||
24.688321
|
||||
],
|
||||
[
|
||||
120.762371,
|
||||
24.658335
|
||||
],
|
||||
[
|
||||
120.688661,
|
||||
24.600678
|
||||
],
|
||||
[
|
||||
120.64277,
|
||||
24.490172
|
||||
],
|
||||
[
|
||||
120.589187,
|
||||
24.432354
|
||||
],
|
||||
[
|
||||
120.546299,
|
||||
24.370413
|
||||
],
|
||||
[
|
||||
120.521009,
|
||||
24.312038
|
||||
],
|
||||
[
|
||||
120.470534,
|
||||
24.24259
|
||||
],
|
||||
[
|
||||
120.451461,
|
||||
24.182691
|
||||
],
|
||||
[
|
||||
120.392029,
|
||||
24.11824
|
||||
],
|
||||
[
|
||||
120.316158,
|
||||
23.984881
|
||||
],
|
||||
[
|
||||
120.278276,
|
||||
23.927798
|
||||
],
|
||||
[
|
||||
120.245768,
|
||||
23.840553
|
||||
],
|
||||
[
|
||||
120.175377,
|
||||
23.807385
|
||||
],
|
||||
[
|
||||
120.102773,
|
||||
23.700981
|
||||
],
|
||||
[
|
||||
120.094817,
|
||||
23.587466
|
||||
],
|
||||
[
|
||||
120.121741,
|
||||
23.504664
|
||||
],
|
||||
[
|
||||
120.107831,
|
||||
23.341264
|
||||
],
|
||||
[
|
||||
120.081434,
|
||||
23.29191
|
||||
],
|
||||
[
|
||||
120.018947,
|
||||
23.073115
|
||||
],
|
||||
[
|
||||
120.029537,
|
||||
23.048623
|
||||
],
|
||||
[
|
||||
120.131382,
|
||||
23.002118
|
||||
],
|
||||
[
|
||||
120.149138,
|
||||
22.896715
|
||||
],
|
||||
[
|
||||
120.200403,
|
||||
22.721101
|
||||
],
|
||||
[
|
||||
120.274272,
|
||||
22.560181
|
||||
],
|
||||
[
|
||||
120.297191,
|
||||
22.531315
|
||||
],
|
||||
[
|
||||
120.443558,
|
||||
22.441245
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
[
|
||||
124.542984,
|
||||
25.903911
|
||||
],
|
||||
[
|
||||
124.586346,
|
||||
25.913777
|
||||
],
|
||||
[
|
||||
124.572805,
|
||||
25.93974
|
||||
],
|
||||
[
|
||||
124.541825,
|
||||
25.931031
|
||||
],
|
||||
[
|
||||
124.542984,
|
||||
25.903911
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
[
|
||||
123.445286,
|
||||
25.725966
|
||||
],
|
||||
[
|
||||
123.472104,
|
||||
25.713024
|
||||
],
|
||||
[
|
||||
123.508933,
|
||||
25.723237
|
||||
],
|
||||
[
|
||||
123.514834,
|
||||
25.751226
|
||||
],
|
||||
[
|
||||
123.483063,
|
||||
25.768587
|
||||
],
|
||||
[
|
||||
123.444496,
|
||||
25.746514
|
||||
],
|
||||
[
|
||||
123.445286,
|
||||
25.725966
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
[
|
||||
119.64597,
|
||||
23.55091
|
||||
],
|
||||
[
|
||||
119.701081,
|
||||
23.550657
|
||||
],
|
||||
[
|
||||
119.678057,
|
||||
23.600041
|
||||
],
|
||||
[
|
||||
119.610089,
|
||||
23.603953
|
||||
],
|
||||
[
|
||||
119.594388,
|
||||
23.577245
|
||||
],
|
||||
[
|
||||
119.566306,
|
||||
23.584732
|
||||
],
|
||||
[
|
||||
119.562565,
|
||||
23.530377
|
||||
],
|
||||
[
|
||||
119.573788,
|
||||
23.505885
|
||||
],
|
||||
[
|
||||
119.609141,
|
||||
23.503864
|
||||
],
|
||||
[
|
||||
119.64597,
|
||||
23.55091
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
[
|
||||
123.667207,
|
||||
25.914066
|
||||
],
|
||||
[
|
||||
123.707092,
|
||||
25.916873
|
||||
],
|
||||
[
|
||||
123.678008,
|
||||
25.938667
|
||||
],
|
||||
[
|
||||
123.667207,
|
||||
25.914066
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
[
|
||||
119.506031,
|
||||
23.625567
|
||||
],
|
||||
[
|
||||
119.505241,
|
||||
23.575814
|
||||
],
|
||||
[
|
||||
119.472416,
|
||||
23.557136
|
||||
],
|
||||
[
|
||||
119.523207,
|
||||
23.563699
|
||||
],
|
||||
[
|
||||
119.525578,
|
||||
23.624895
|
||||
],
|
||||
[
|
||||
119.506031,
|
||||
23.625567
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
[
|
||||
119.49739,
|
||||
23.386683
|
||||
],
|
||||
[
|
||||
119.495125,
|
||||
23.350156
|
||||
],
|
||||
[
|
||||
119.516885,
|
||||
23.349903
|
||||
],
|
||||
[
|
||||
119.49739,
|
||||
23.386683
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
[
|
||||
119.557454,
|
||||
23.666474
|
||||
],
|
||||
[
|
||||
119.604083,
|
||||
23.616989
|
||||
],
|
||||
[
|
||||
119.615516,
|
||||
23.660925
|
||||
],
|
||||
[
|
||||
119.586485,
|
||||
23.675974
|
||||
],
|
||||
[
|
||||
119.557454,
|
||||
23.666474
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
[
|
||||
121.46823,
|
||||
22.676644
|
||||
],
|
||||
[
|
||||
121.476502,
|
||||
22.64166
|
||||
],
|
||||
[
|
||||
121.513541,
|
||||
22.631833
|
||||
],
|
||||
[
|
||||
121.5147,
|
||||
22.67639
|
||||
],
|
||||
[
|
||||
121.46823,
|
||||
22.676644
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
[
|
||||
121.510538,
|
||||
22.087185
|
||||
],
|
||||
[
|
||||
121.507693,
|
||||
22.048523
|
||||
],
|
||||
[
|
||||
121.534089,
|
||||
22.022146
|
||||
],
|
||||
[
|
||||
121.594522,
|
||||
21.995382
|
||||
],
|
||||
[
|
||||
121.604586,
|
||||
22.022699
|
||||
],
|
||||
[
|
||||
121.575028,
|
||||
22.037122
|
||||
],
|
||||
[
|
||||
121.575607,
|
||||
22.084421
|
||||
],
|
||||
[
|
||||
121.510538,
|
||||
22.087185
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
[
|
||||
122.097533,
|
||||
25.500168
|
||||
],
|
||||
[
|
||||
122.093581,
|
||||
25.47183
|
||||
],
|
||||
[
|
||||
122.124825,
|
||||
25.475932
|
||||
],
|
||||
[
|
||||
122.097533,
|
||||
25.500168
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
[
|
||||
119.421467,
|
||||
23.216684
|
||||
],
|
||||
[
|
||||
119.421309,
|
||||
23.18935
|
||||
],
|
||||
[
|
||||
119.453396,
|
||||
23.217697
|
||||
],
|
||||
[
|
||||
119.421467,
|
||||
23.216684
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
[
|
||||
120.355042,
|
||||
22.327259
|
||||
],
|
||||
[
|
||||
120.395454,
|
||||
22.342287
|
||||
],
|
||||
[
|
||||
120.383072,
|
||||
22.355573
|
||||
],
|
||||
[
|
||||
120.355042,
|
||||
22.327259
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
25715
src/assets/map/吉林省.json
Normal file
28807
src/assets/map/四川省.json
Normal file
12138
src/assets/map/天津市.json
Normal file
8611
src/assets/map/宁夏回族自治区.json
Normal file
22053
src/assets/map/安徽省.json
Normal file
29293
src/assets/map/山东省.json
Normal file
10503
src/assets/map/山西省.json
Normal file
33743
src/assets/map/广东省.json
Normal file
29257
src/assets/map/广西壮族自治区.json
Normal file
21513
src/assets/map/新疆维吾尔自治区.json
Normal file
16899
src/assets/map/江苏省.json
Normal file
21187
src/assets/map/江西省.json
Normal file
12711
src/assets/map/河北省.json
Normal file
26701
src/assets/map/河南省.json
Normal file
6063
src/assets/map/海南省.json
Normal file
27151
src/assets/map/湖北省.json
Normal file
30605
src/assets/map/湖南省.json
Normal file
2197
src/assets/map/澳门特别行政区.json
Normal file
18429
src/assets/map/甘肃省.json
Normal file
20143
src/assets/map/福建省.json
Normal file
24575
src/assets/map/西藏自治区.json
Normal file
22711
src/assets/map/贵州省.json
Normal file
28197
src/assets/map/辽宁省.json
Normal file
27761
src/assets/map/重庆市.json
Normal file
12429
src/assets/map/陕西省.json
Normal file
17541
src/assets/map/青海省.json
Normal file
23417
src/assets/map/香港特别行政区.json
Normal file
25543
src/assets/map/黑龙江省.json
Normal file
97
src/assets/styles/anji.scss
Normal file
@@ -0,0 +1,97 @@
|
||||
.anji-card {
|
||||
margin-bottom: 5px;
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
font-size: 14px;
|
||||
font-variant: tabular-nums;
|
||||
line-height: 1.5;
|
||||
list-style: none;
|
||||
font-feature-settings: "tnum";
|
||||
position: relative;
|
||||
background: #fff;
|
||||
border-radius: 2px;
|
||||
transition: all 0.3s;
|
||||
|
||||
.card-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
min-height: 35px;
|
||||
padding: 0 24px;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
background: transparent;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
border-radius: 2px 2px 0 0;
|
||||
zoom: 1;
|
||||
|
||||
.main-card-header-button {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.card-body {
|
||||
padding: 24px;
|
||||
zoom: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.el-form-item .el-form-item__label {
|
||||
line-height: 28px;
|
||||
}
|
||||
.el-form-item__content {
|
||||
line-height: 28px;
|
||||
}
|
||||
.el-input__icon {
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.el-input--suffix .el-input__inner {
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
}
|
||||
.el-input .el-input__inner {
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
}
|
||||
.el-button {
|
||||
padding: 7px 15px;
|
||||
font-size: 12px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.el-dropdown-menu__item {
|
||||
min-width: 80px;
|
||||
max-width: 110px;
|
||||
.el-button--text {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
.el-dropdown-menu__item:focus,
|
||||
.el-dropdown-menu__item:not(.is-disabled):hover {
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
.el-table td {
|
||||
padding: 6px 0;
|
||||
}
|
||||
|
||||
@keyframes turn {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: rotate(90deg);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: rotate(180deg);
|
||||
}
|
||||
75% {
|
||||
-webkit-transform: rotate(270deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
72
src/assets/styles/common.css
Normal file
@@ -0,0 +1,72 @@
|
||||
/* 滚动条 */
|
||||
|
||||
::-webkit-scrollbar-track-piece {
|
||||
/*修改滚动条的背景和圆角*/
|
||||
background: #f7f7f7;
|
||||
-webkit-border-radius: 7px;
|
||||
}
|
||||
|
||||
/*修改垂直滚动条的样式*/
|
||||
::-webkit-scrollbar-thumb:vertical {
|
||||
background-color: #dcdfe6;
|
||||
-webkit-border-radius: 7px;
|
||||
}
|
||||
|
||||
/*修改水平滚动条的样式*/
|
||||
::-webkit-scrollbar-thumb:horizontal {
|
||||
background-color: #dcdfe6;
|
||||
-webkit-border-radius: 7px;
|
||||
}
|
||||
|
||||
/* IE7 */
|
||||
input:focus,
|
||||
a:focus,
|
||||
button:focus,
|
||||
textarea:focus {
|
||||
outline: none;
|
||||
}
|
||||
input:-webkit-autofill {
|
||||
/* -webkit-box-shadow: 0 0 0px 1000px black inset !important; */
|
||||
/* background-color: #ffffff !important;*/
|
||||
/* background-image: none !important;
|
||||
color: white !important; */
|
||||
box-shadow: 0 0 0px 1000px rgb(229, 233, 238) inset !important;
|
||||
-webkit-box-shadow: 0 0 0px 1000px rgba(0, 0, 0, 1) inset !important;
|
||||
border: 0px solid #ccc !important;
|
||||
-webkit-text-fill-color: #fff;
|
||||
}
|
||||
/* input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
|
||||
background-color: #040406 !important;
|
||||
background-image: none !important;
|
||||
color: white !important;
|
||||
} */
|
||||
::-ms-clear {
|
||||
display: none;
|
||||
}
|
||||
|
||||
::-ms-reveal {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.on-focus:focus {
|
||||
border: 1px solid #5bc0de;
|
||||
}
|
||||
.clearfix::after {
|
||||
content: "";
|
||||
display: block;
|
||||
clear: both;
|
||||
height: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.mt10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.fr {
|
||||
float: right;
|
||||
}
|
||||
.fl {
|
||||
float: left;
|
||||
}
|
||||
.el-table td {
|
||||
padding: 8px 0;
|
||||
}
|
||||
95
src/assets/styles/element-ui.scss
Normal file
@@ -0,0 +1,95 @@
|
||||
//to reset element-ui default css
|
||||
.el-upload {
|
||||
input[type="file"] {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.el-upload__input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
// 解决table 因为body部分滚动条 header 错位问题:
|
||||
.el-table--border th.gutter:last-of-type {
|
||||
display: block !important;
|
||||
width: 17px !important;
|
||||
}
|
||||
|
||||
//暂时性解决diolag 问题 https://github.com/ElemeFE/element/issues/2461
|
||||
.el-dialog {
|
||||
transform: none;
|
||||
left: 0;
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
|
||||
.el-dialog__header{
|
||||
background-color: rgb(48, 77, 167);
|
||||
color: #fff;
|
||||
.el-dialog__title{
|
||||
color: #fff;
|
||||
}
|
||||
.el-dialog__headerbtn i {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-tooltip__popper{
|
||||
max-width: 80%;
|
||||
}
|
||||
|
||||
//element ui upload
|
||||
.upload-container {
|
||||
.el-upload {
|
||||
width: 100%;
|
||||
.el-upload-dragger {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
}
|
||||
}
|
||||
}
|
||||
//element ui 带选择列的input
|
||||
.el-input-group {
|
||||
display: inline-table !important;
|
||||
}
|
||||
.input-with-select{
|
||||
.el-input-group__prepend{
|
||||
.el-select{
|
||||
width: 105px;
|
||||
}
|
||||
}
|
||||
}
|
||||
//element in-line form 一行两个带图村输入框
|
||||
.el-form--inline{
|
||||
.el-form-item{
|
||||
width: 45%;
|
||||
margin-right: 25px;
|
||||
.el-form-item__label {
|
||||
font-size: 12px;
|
||||
line-height: 17px;
|
||||
padding: 0 0 5px;
|
||||
}
|
||||
.el-form-item__content{
|
||||
.el-input{
|
||||
.el-input__inner{
|
||||
// padding-left: 40px;
|
||||
}
|
||||
.el-input__prefix{
|
||||
left: 0px;
|
||||
background-color: #f5f7fa;
|
||||
color: #909399;
|
||||
vertical-align: middle;
|
||||
display: table-cell;
|
||||
border: 1px solid #dcdfe6;
|
||||
border-radius: 4px;
|
||||
width: 40px;
|
||||
height: 98%;
|
||||
white-space: nowrap;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
363
src/assets/styles/index.scss
Normal file
@@ -0,0 +1,363 @@
|
||||
@import "./anji.scss";
|
||||
@import "./variables.scss";
|
||||
@import "./mixin.scss";
|
||||
@import "./transition.scss";
|
||||
@import "./element-ui.scss";
|
||||
@import "./sidebar.scss";
|
||||
|
||||
body {
|
||||
height: 100%;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-rendering: optimizeLegibility;
|
||||
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
|
||||
Microsoft YaHei, Arial, sans-serif;
|
||||
}
|
||||
ul,
|
||||
li,
|
||||
ol,
|
||||
li {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
/*隐藏滚动条,当IE下溢出,仍然可以滚动*/
|
||||
-ms-overflow-style: none;
|
||||
/*火狐下隐藏滚动条*/
|
||||
scrollbar-width: none;
|
||||
}
|
||||
// 谷歌浏览器去滚动条
|
||||
html::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
.el-image-viewer__close {
|
||||
color: #fff;
|
||||
}
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
label {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
a,
|
||||
a:focus,
|
||||
a:hover {
|
||||
cursor: pointer;
|
||||
color: inherit;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
a:focus,
|
||||
a:active {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
a,
|
||||
a:focus,
|
||||
a:hover {
|
||||
cursor: pointer;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
&:after {
|
||||
visibility: hidden;
|
||||
display: block;
|
||||
font-size: 0;
|
||||
content: " ";
|
||||
clear: both;
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
//main-container全局样式
|
||||
.app-main {
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.app-container {
|
||||
padding: 20px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.filter-container {
|
||||
padding-bottom: 10px;
|
||||
.filter-item {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
.float-r {
|
||||
float: right;
|
||||
}
|
||||
.float-l {
|
||||
float: left;
|
||||
}
|
||||
/*日志折叠面板定制*/
|
||||
.log .el-collapse {
|
||||
border-top: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
.log .el-collapse-item__header {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
cursor: pointer;
|
||||
border: 1px solid #fff;
|
||||
background: rgba(145, 163, 177, 0.15);
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
-webkit-transition: border-bottom-color 0.3s;
|
||||
transition: border-bottom-color 0.3s;
|
||||
outline: 0;
|
||||
padding: 0 20px;
|
||||
}
|
||||
.log .el-collapse-item__wrap {
|
||||
will-change: height;
|
||||
overflow: hidden;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #fff;
|
||||
background: #263c7c;
|
||||
}
|
||||
.log .el-collapse-item__content {
|
||||
font-size: 14px;
|
||||
color: #ffffff;
|
||||
padding: 20px;
|
||||
}
|
||||
.log .el-collapse-item__arrow {
|
||||
margin-top: 14px;
|
||||
float: right;
|
||||
margin-right: -77px;
|
||||
}
|
||||
.log .icon-btn_style,
|
||||
.log .icon-btn_style:hover {
|
||||
background: none;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
//大屏展示的一些样式
|
||||
.my-dialog {
|
||||
.el-dialog {
|
||||
background: #062b69;
|
||||
border: 1px solid #5ddaf6;
|
||||
}
|
||||
.el-dialog__header {
|
||||
border-bottom: 1px solid #5ddaf6;
|
||||
text-align: center;
|
||||
}
|
||||
.el-dialog__title {
|
||||
color: #5cdcf9;
|
||||
}
|
||||
.el-input__inner {
|
||||
background: #091e43;
|
||||
border-color: #254e97;
|
||||
}
|
||||
.el-date-editor .el-range__icon {
|
||||
color: #5cdcf9;
|
||||
}
|
||||
input {
|
||||
background: #091e43;
|
||||
}
|
||||
.el-date-editor .el-range-input {
|
||||
color: #5cdcf9;
|
||||
}
|
||||
.form-handle {
|
||||
.el-form-item__label {
|
||||
color: #5cdcf9;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
.el-form-item {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.el-textarea__inner,
|
||||
.el-select:hover .el-input__inner {
|
||||
background-color: #091e43;
|
||||
border-color: #254e97;
|
||||
border-bottom: 1px solid #254e97;
|
||||
}
|
||||
.el-button--blue {
|
||||
color: #fff;
|
||||
background-color: #224788;
|
||||
border-color: #224788;
|
||||
}
|
||||
.el-button--green {
|
||||
color: #fff;
|
||||
background-color: #2092ad;
|
||||
border-color: #2092ad;
|
||||
}
|
||||
}
|
||||
.el-input--prefix .el-input__inner {
|
||||
padding-left: 45px;
|
||||
}
|
||||
.el-input-group__append,
|
||||
.el-input-group__prepend {
|
||||
color: #333;
|
||||
}
|
||||
//avue
|
||||
.preview-form {
|
||||
height: auto !important;
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
.x-spreadsheet-toolbar-btns {
|
||||
margin-left: 30px !important;
|
||||
}
|
||||
.ml10 {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.Customized .CodeMirror {
|
||||
font-family: monospace;
|
||||
height: 190px !important;
|
||||
color: black;
|
||||
direction: ltr;
|
||||
}
|
||||
.jsoneditor-vue {
|
||||
height: 100%;
|
||||
}
|
||||
.printSet {
|
||||
background-image: url("../images/bianzu.png") !important;
|
||||
background-size: 19px;
|
||||
background-position: left top;
|
||||
background-repeat: no-repeat;
|
||||
position: absolute;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
.qrCodes {
|
||||
background-image: url("../images/qrcode.png") !important;
|
||||
background-size: 19px;
|
||||
background-position: left top;
|
||||
background-repeat: no-repeat;
|
||||
position: absolute;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
.barCodes {
|
||||
background-image: url("../images/tiaoxingma.png") !important;
|
||||
background-size: 19px;
|
||||
background-position: left top;
|
||||
background-repeat: no-repeat;
|
||||
position: absolute;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
.collapse-input-style {
|
||||
.el-input__inner,
|
||||
.el-textarea__inner {
|
||||
background: #263445 !important;
|
||||
border: 1px solid #3f5673;
|
||||
color: #a8e3ff;
|
||||
}
|
||||
.el-slider__runway {
|
||||
height: 2px;
|
||||
background-color: #5e6b82;
|
||||
}
|
||||
.el-slider__bar {
|
||||
height: 2px;
|
||||
}
|
||||
.el-slider__button-wrapper {
|
||||
top: -17px;
|
||||
}
|
||||
.el-slider__button {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
.el-switch__core {
|
||||
background-color: #5e6b82;
|
||||
border: 1px solid #3f5673;
|
||||
}
|
||||
.el-input-group__append,
|
||||
.el-input-group__prepend {
|
||||
background: #5e6b82 !important;
|
||||
border: 1px solid #3f5673;
|
||||
color: #a8e3ff;
|
||||
}
|
||||
.el-input-number__increase,
|
||||
.el-input-number__decrease {
|
||||
background: #5e6b82 !important;
|
||||
border: 1px solid #3f5673;
|
||||
color: #a8e3ff;
|
||||
}
|
||||
.el-input-number.is-controls-right .el-input-number__increase {
|
||||
height: 15px;
|
||||
border-bottom: 1px solid #3f5673;
|
||||
}
|
||||
.el-input-number.is-controls-right .el-input-number__decrease {
|
||||
border-left: 1px solid #3f5673;
|
||||
}
|
||||
.el-form-item__label {
|
||||
font-size: 12px;
|
||||
color: #bfcbd9 !important;
|
||||
font-weight: normal !important;
|
||||
}
|
||||
}
|
||||
// .el-form-item__label {
|
||||
// line-height: 30px !important;
|
||||
// height: 30px;
|
||||
// }
|
||||
// .el-form-item__content {
|
||||
// line-height: 30px !important;
|
||||
// height: 30px;
|
||||
// }
|
||||
|
||||
//自定义表格特殊类型 文字背景
|
||||
// 'highway': 'table-primary',
|
||||
// 'railway': 'table-success',
|
||||
// 'waterway': 'table-info',
|
||||
// 'airtransport': 'table-warning',
|
||||
// 'multimodal': 'table-danger'
|
||||
.table-primary,
|
||||
.table-success,
|
||||
.table-info,
|
||||
.table-warning,
|
||||
.table-danger {
|
||||
border-radius: 3px;
|
||||
padding: 2px 5px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
.table-primary {
|
||||
background: rgba(32, 182, 249, 0.1);
|
||||
border-color: rgba(32, 182, 249, 0.2);
|
||||
color: rgb(32, 182, 249);
|
||||
}
|
||||
.table-success {
|
||||
background: rgba(0, 226, 68, 0.1);
|
||||
border-color: rgba(0, 226, 68, 0.2);
|
||||
color: rgb(0, 226, 68);
|
||||
}
|
||||
.table-info {
|
||||
background: rgba(216, 216, 216, 0.1);
|
||||
border-color: rgba(216, 216, 216, 0.2);
|
||||
color: rgb(216, 216, 216);
|
||||
}
|
||||
.table-warning {
|
||||
background: rgba(255, 216, 40, 0.1);
|
||||
border-color: rgba(255, 216, 40, 0.2);
|
||||
color: rgb(241, 185, 0);
|
||||
}
|
||||
.table-danger {
|
||||
background: rgba(249, 32, 32, 0.1);
|
||||
border-color: rgba(249, 32, 32, 0.2);
|
||||
color: rgb(249, 32, 32);
|
||||
}
|
||||
27
src/assets/styles/mixin.scss
Normal file
@@ -0,0 +1,27 @@
|
||||
@mixin clearfix {
|
||||
&:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin scrollBar {
|
||||
&::-webkit-scrollbar-track-piece {
|
||||
background: #d3dce6;
|
||||
}
|
||||
&::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: #99a9bf;
|
||||
border-radius: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin relative {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
108
src/assets/styles/screenDesigner.scss
Normal file
@@ -0,0 +1,108 @@
|
||||
.layout {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #242a30;
|
||||
color: #fff;
|
||||
|
||||
.layout-container {
|
||||
width: 100%;
|
||||
height: calc(100vh - 40px);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
overflow: hidden;
|
||||
.layout-middle {
|
||||
// display: flex;
|
||||
position: relative;
|
||||
//width: calc(100% - 445px);
|
||||
height: 100%;
|
||||
background-color: rgb(36, 42, 48);
|
||||
box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
border: 1px solid rgb(36, 42, 48);
|
||||
align-items: center;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
}
|
||||
.layout-right {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
/deep/ .el-tabs--border-card {
|
||||
border: 0;
|
||||
.el-tabs__header {
|
||||
background: transparent;
|
||||
.el-tabs__nav {
|
||||
width: 100%;
|
||||
.el-tabs__item {
|
||||
background-color: #242f3b;
|
||||
border: 0px;
|
||||
font-size: 12px;
|
||||
width: 50%;
|
||||
.icon {
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-tabs__item.is-active {
|
||||
background-color: #31455d;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-tabs__content {
|
||||
background-color: #242a30;
|
||||
height: calc(100vh - 80px);
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
.el-tab-pane {
|
||||
color: #bfcbd9;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track,
|
||||
&::-webkit-scrollbar-thumb {
|
||||
border-radius: 1px;
|
||||
border: 0 solid transparent;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track-piece {
|
||||
/*修改滚动条的背景和圆角*/
|
||||
background: #29405c;
|
||||
-webkit-border-radius: 7px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
box-shadow: 1px 1px 5px rgba(116, 148, 170, 0.5) inset;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
min-height: 20px;
|
||||
background-clip: content-box;
|
||||
box-shadow: 0 0 0 5px rgba(116, 148, 170, 0.5) inset;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-corner {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/*修改垂直滚动条的样式*/
|
||||
&::-webkit-scrollbar-thumb:vertical {
|
||||
background-color: #00113a;
|
||||
-webkit-border-radius: 7px;
|
||||
}
|
||||
|
||||
/*修改水平滚动条的样式*/
|
||||
&::-webkit-scrollbar-thumb:horizontal {
|
||||
background-color: #00113a;
|
||||
-webkit-border-radius: 7px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
146
src/assets/styles/sidebar.scss
Normal file
@@ -0,0 +1,146 @@
|
||||
#app {
|
||||
// 主体区域
|
||||
.main-container {
|
||||
min-height: 100%;
|
||||
transition: margin-left .28s;
|
||||
margin-left: 180px;
|
||||
position: relative;
|
||||
}
|
||||
// 侧边栏
|
||||
.sidebar-container {
|
||||
transition: width 0.28s;
|
||||
width: 180px !important;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
font-size: 0px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1001;
|
||||
overflow: hidden;
|
||||
box-shadow: 1px 1px 4px #e7eeff;
|
||||
//reset element-ui css
|
||||
.horizontal-collapse-transition {
|
||||
transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
|
||||
}
|
||||
.el-scrollbar__bar.is-vertical{
|
||||
right: 0px;
|
||||
}
|
||||
.scrollbar-wrapper {
|
||||
overflow-x: hidden!important;
|
||||
|
||||
.el-scrollbar__view {
|
||||
height:calc(100vh);
|
||||
}
|
||||
}
|
||||
.is-horizontal {
|
||||
display: none;
|
||||
}
|
||||
a {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.svg-icon {
|
||||
margin-right: 16px;
|
||||
}
|
||||
.el-menu {
|
||||
border: none;
|
||||
height: 100%;
|
||||
width: 100% !important;
|
||||
}
|
||||
.is-active > .el-submenu__title{
|
||||
color: #333!important;
|
||||
}
|
||||
}
|
||||
.hideSidebar {
|
||||
.sidebar-container {
|
||||
width: 56px !important;
|
||||
.iconfont {
|
||||
font-size: 24px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
.main-container {
|
||||
margin-left:56px;
|
||||
}
|
||||
.submenu-title-noDropdown {
|
||||
padding-left: 10px !important;
|
||||
position: relative;
|
||||
.el-tooltip {
|
||||
padding: 0 10px !important;
|
||||
}
|
||||
}
|
||||
.el-submenu {
|
||||
overflow: hidden;
|
||||
&>.el-submenu__title {
|
||||
padding-left: 10px !important;
|
||||
.el-submenu__icon-arrow {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-menu--collapse {
|
||||
.el-submenu {
|
||||
&>.el-submenu__title {
|
||||
&>span {
|
||||
height: 0;
|
||||
width: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.sidebar-container .nest-menu .el-submenu>.el-submenu__title,
|
||||
.sidebar-container .el-submenu .el-menu-item {
|
||||
min-width: 180px !important;
|
||||
background-color: #fff !important;
|
||||
|
||||
&:hover {
|
||||
color: #406be0 !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.el-menu-item{
|
||||
&.is-active{
|
||||
border-right:3px solid #409EFF;
|
||||
}
|
||||
}
|
||||
.el-menu--collapse .el-menu .el-submenu {
|
||||
min-width: 180px !important;
|
||||
}
|
||||
|
||||
//适配移动端
|
||||
.mobile {
|
||||
.main-container {
|
||||
margin-left: 0px;
|
||||
}
|
||||
.sidebar-container {
|
||||
transition: transform .28s;
|
||||
width: 180px !important;
|
||||
}
|
||||
&.hideSidebar {
|
||||
.sidebar-container {
|
||||
transition-duration: 0.3s;
|
||||
transform: translate3d(-180px, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
.withoutAnimation {
|
||||
.main-container,
|
||||
.sidebar-container {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-menu--vertical{
|
||||
& >.el-menu{
|
||||
.svg-icon{
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
46
src/assets/styles/transition.scss
Normal file
@@ -0,0 +1,46 @@
|
||||
//globl transition css
|
||||
|
||||
/*fade*/
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: opacity 0.28s;
|
||||
}
|
||||
|
||||
.fade-enter,
|
||||
.fade-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/*fade-transform*/
|
||||
.fade-transform-leave-active,
|
||||
.fade-transform-enter-active {
|
||||
transition: all .5s;
|
||||
}
|
||||
.fade-transform-enter {
|
||||
opacity: 0;
|
||||
transform: translateX(-30px);
|
||||
}
|
||||
.fade-transform-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateX(30px);
|
||||
}
|
||||
|
||||
/*fade*/
|
||||
.breadcrumb-enter-active,
|
||||
.breadcrumb-leave-active {
|
||||
transition: all .5s;
|
||||
}
|
||||
|
||||
.breadcrumb-enter,
|
||||
.breadcrumb-leave-active {
|
||||
opacity: 0;
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
.breadcrumb-move {
|
||||
transition: all .5s;
|
||||
}
|
||||
|
||||
.breadcrumb-leave-active {
|
||||
position: absolute;
|
||||
}
|
||||
4
src/assets/styles/variables.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
//sidebar
|
||||
$menuBg:#304156;
|
||||
$subMenuBg:#1f2d3d;
|
||||
$menuHover:#001528;
|
||||
139
src/components/AnjiPlus/anji-autocomplete.vue
Normal file
@@ -0,0 +1,139 @@
|
||||
<template>
|
||||
<el-autocomplete
|
||||
v-model.trim="inputValue"
|
||||
:debounce="500"
|
||||
class="inline-input"
|
||||
:fetch-suggestions="querySearch"
|
||||
:disabled="disabled"
|
||||
@select="handleSelect"
|
||||
@input="changeInput"
|
||||
>
|
||||
<template slot-scope="{ item }">
|
||||
<div class="name">{{ getItemLabel(item, item.value) }}</div>
|
||||
<span class="addr">{{ item[option] }}</span>
|
||||
</template>
|
||||
</el-autocomplete>
|
||||
</template>
|
||||
<script>
|
||||
import request from "@/utils/request";
|
||||
export default {
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: () => {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
url: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
appointValue: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
option: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
restaurants: [],
|
||||
inputValue: ""
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
value(val) {
|
||||
this.echoInput(val);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.echoInput(this.value);
|
||||
},
|
||||
methods: {
|
||||
getItemLabel(item, value) {
|
||||
if (this.label.indexOf("${") < 0 && this.label.indexOf("}" < 0)) {
|
||||
return item[this.label];
|
||||
}
|
||||
let reg = /\$\{[a-zA-Z0-9]*\}/g;
|
||||
let list = this.label.match(reg);
|
||||
console.log(list);
|
||||
// ["${id}", "${text}"]
|
||||
let result = this.label;
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
let sub = list[i];
|
||||
let key = sub.replace("${", "").replace("}", "");
|
||||
result = result.replace(sub, item[key]);
|
||||
}
|
||||
return value + " " + result;
|
||||
},
|
||||
querySearch(queryString, cb) {
|
||||
request({ url: this.url }).then(res => {
|
||||
if (res.code == 200 && res.data) {
|
||||
this.restaurants = res.data;
|
||||
} else {
|
||||
this.restaurants = [];
|
||||
}
|
||||
this.restaurants = JSON.parse(
|
||||
JSON.stringify(this.restaurants).replace(
|
||||
new RegExp(this.appointValue, "g"),
|
||||
"value"
|
||||
)
|
||||
);
|
||||
let results = queryString
|
||||
? this.restaurants.filter(this.createFilter(queryString))
|
||||
: this.restaurants;
|
||||
cb(results);
|
||||
});
|
||||
},
|
||||
createFilter(queryString) {
|
||||
return restaurant => {
|
||||
return (
|
||||
restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
|
||||
0
|
||||
);
|
||||
};
|
||||
},
|
||||
handleSelect(item) {
|
||||
this.$emit("input", item.value);
|
||||
this.$emit("change", item.value, item);
|
||||
},
|
||||
changeInput(val) {
|
||||
this.$emit("input", val);
|
||||
this.$emit("change", val);
|
||||
},
|
||||
// 回显
|
||||
echoInput(value) {
|
||||
if (!value) {
|
||||
this.inputValue = "";
|
||||
} else {
|
||||
this.inputValue = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.inline-input {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
313
src/components/AnjiPlus/anji-cascader.vue
Normal file
@@ -0,0 +1,313 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row>
|
||||
<el-col v-if="selectIsHide('country')" :span="4">
|
||||
<el-select
|
||||
v-model.trim="countryCode"
|
||||
filterable
|
||||
placeholder="请选择国家"
|
||||
:disabled="disabled"
|
||||
clearable
|
||||
@change="countryChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="(option, i) in countryArr"
|
||||
:key="i"
|
||||
:value="option.value"
|
||||
:label="option.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col v-if="selectIsHide('province')" :span="7">
|
||||
<el-select
|
||||
v-model.trim="provinceCode"
|
||||
filterable
|
||||
placeholder="请选择省"
|
||||
:disabled="disabled"
|
||||
clearable
|
||||
@change="provinceChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="(option, i) in casCaredArr"
|
||||
:key="i"
|
||||
:value="option.value"
|
||||
:label="option.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col v-if="selectIsHide('city')" :span="7">
|
||||
<el-select
|
||||
v-model.trim="cityCode"
|
||||
filterable
|
||||
placeholder="请选择市"
|
||||
:disabled="disabled"
|
||||
clearable
|
||||
@change="cityChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="(option, x) in cityArr"
|
||||
:key="x"
|
||||
:value="option.value"
|
||||
:label="option.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col v-if="selectIsHide('area')" :span="6">
|
||||
<el-select
|
||||
v-model.trim="areaCode"
|
||||
filterable
|
||||
placeholder="请选择区"
|
||||
:disabled="disabled"
|
||||
clearable
|
||||
@change="districtChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="(option, y) in districtArr"
|
||||
:key="y"
|
||||
:value="option.value"
|
||||
:label="option.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import axios from "axios";
|
||||
import { getToken } from "@/utils/auth";
|
||||
export default {
|
||||
name: "Cselect",
|
||||
props: {
|
||||
url: {
|
||||
type: String,
|
||||
default: () => "/meta/metaAreaInfo/countryTree"
|
||||
},
|
||||
value: null,
|
||||
singleDisplay: String,
|
||||
disabled: Boolean
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
countryArr: [],
|
||||
casCaredArr: [],
|
||||
cityArr: [],
|
||||
districtArr: [],
|
||||
countryCode: "", // 国code
|
||||
provinceCode: "", // 省code
|
||||
cityCode: "", // 州市code
|
||||
areaCode: "", // 区县code
|
||||
countryName: "",
|
||||
provinceName: "",
|
||||
cityName: "",
|
||||
areaName: ""
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
value(value) {
|
||||
this.echoSelect(value);
|
||||
this.initData();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initData();
|
||||
this.echoSelect(this.value);
|
||||
},
|
||||
methods: {
|
||||
// singleDisplay 不配显示 country province city area 配那个那个不显示
|
||||
selectIsHide(val) {
|
||||
if (this.singleDisplay === undefined) {
|
||||
return true;
|
||||
} else {
|
||||
return !(this.singleDisplay.indexOf(val) >= 0);
|
||||
}
|
||||
},
|
||||
// 查询数据
|
||||
initData() {
|
||||
this.queryData();
|
||||
},
|
||||
queryData() {
|
||||
axios({
|
||||
url: process.env.BASE_API + this.url,
|
||||
methods: "get",
|
||||
headers: {
|
||||
Authorization: getToken(),
|
||||
systemCode: process.env.VUE_APP_SYSTEM_CODE
|
||||
}
|
||||
}).then(res => {
|
||||
const data = res.data;
|
||||
if (data.code != 200 || data.data.length == 0) return;
|
||||
this.countryArr = data.data;
|
||||
!this.selectIsHide("country") &&
|
||||
(this.casCaredArr = data.data[0].children);
|
||||
this.updateCountry();
|
||||
this.updateCity();
|
||||
this.updateDistrict();
|
||||
});
|
||||
},
|
||||
updateCountry() {
|
||||
for (let i in this.countryArr) {
|
||||
let obj = this.countryArr[i];
|
||||
if (obj.value == this.countryCode) {
|
||||
this.casCaredArr = obj.children;
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
updateCity() {
|
||||
for (let i in this.casCaredArr) {
|
||||
let obj = this.casCaredArr[i];
|
||||
if (obj.value) {
|
||||
if (obj.value == this.provinceCode) {
|
||||
this.cityArr = obj.children;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
updateDistrict() {
|
||||
for (let i in this.cityArr) {
|
||||
let obj = this.cityArr[i];
|
||||
if (obj.value == this.cityCode) {
|
||||
this.districtArr = obj.children;
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 国
|
||||
countryChange(val) {
|
||||
if (val) {
|
||||
this.updateCountry();
|
||||
this.provinceCode = "";
|
||||
this.cityCode = "";
|
||||
this.areaCode = "";
|
||||
const casCared = this.countryArr.find((n, index) => {
|
||||
if (n.value == val) {
|
||||
return n;
|
||||
}
|
||||
});
|
||||
this.countryName = casCared.label;
|
||||
const obj = {
|
||||
countryName: this.countryName,
|
||||
countryCode: this.countryCode,
|
||||
provinceCode: this.provinceCode,
|
||||
cityCode: this.cityCode,
|
||||
areaCode: this.areaCode,
|
||||
provinceName: this.provinceName,
|
||||
cityName: this.cityName,
|
||||
areaName: this.areaName
|
||||
};
|
||||
this.$emit("input", obj);
|
||||
this.$emit("change", obj);
|
||||
} else {
|
||||
this.$emit("input", {});
|
||||
this.$emit("change", {});
|
||||
}
|
||||
},
|
||||
// 省
|
||||
provinceChange(val) {
|
||||
if (val) {
|
||||
this.updateCity();
|
||||
this.cityCode = "";
|
||||
this.areaCode = "";
|
||||
const casCared = this.casCaredArr.find((n, index) => {
|
||||
if (n.value == val) {
|
||||
return n;
|
||||
}
|
||||
});
|
||||
this.provinceName = casCared.label;
|
||||
const obj = {
|
||||
countryName: this.countryName,
|
||||
countryCode: this.countryCode,
|
||||
provinceCode: this.provinceCode,
|
||||
cityCode: this.cityCode,
|
||||
areaCode: this.areaCode,
|
||||
provinceName: this.provinceName,
|
||||
cityName: this.cityName,
|
||||
areaName: this.areaName
|
||||
};
|
||||
this.$emit("input", obj);
|
||||
this.$emit("change", obj);
|
||||
} else {
|
||||
this.$emit("input", {});
|
||||
this.$emit("change", {});
|
||||
}
|
||||
},
|
||||
// 市
|
||||
cityChange(val) {
|
||||
if (val) {
|
||||
this.areaCode = "";
|
||||
this.updateDistrict();
|
||||
const city = this.cityArr.find((n, index) => {
|
||||
if (n.value == val) {
|
||||
return n;
|
||||
}
|
||||
});
|
||||
this.cityName = city.label;
|
||||
const obj = {
|
||||
countryName: this.countryName,
|
||||
countryCode: this.countryCode,
|
||||
provinceCode: this.provinceCode,
|
||||
cityCode: this.cityCode,
|
||||
areaCode: this.areaCode,
|
||||
provinceName: this.provinceName,
|
||||
cityName: this.cityName,
|
||||
areaName: this.areaName
|
||||
};
|
||||
this.$emit("input", obj);
|
||||
this.$emit("change", obj);
|
||||
} else {
|
||||
this.$emit("input", {});
|
||||
this.$emit("change", {});
|
||||
}
|
||||
},
|
||||
// 区
|
||||
districtChange(val) {
|
||||
if (val) {
|
||||
const district = this.districtArr.find((n, index) => {
|
||||
if (n.value == val) {
|
||||
return n;
|
||||
}
|
||||
});
|
||||
this.areaName = district.label;
|
||||
const obj = {
|
||||
countryName: this.countryName,
|
||||
countryCode: this.countryCode,
|
||||
provinceCode: this.provinceCode,
|
||||
cityCode: this.cityCode,
|
||||
areaCode: this.areaCode,
|
||||
provinceName: this.provinceName,
|
||||
cityName: this.cityName,
|
||||
areaName: this.areaName
|
||||
};
|
||||
this.$emit("input", obj);
|
||||
this.$emit("change", obj);
|
||||
} else {
|
||||
this.$emit("input", {});
|
||||
this.$emit("change", {});
|
||||
}
|
||||
},
|
||||
echoSelect(value) {
|
||||
if (!value) {
|
||||
this.countryCode = "";
|
||||
this.provinceCode = "";
|
||||
this.cityCode = "";
|
||||
this.areaCode = "";
|
||||
this.countryName = "";
|
||||
this.provinceName = "";
|
||||
this.cityName = "";
|
||||
this.areaName = "";
|
||||
} else {
|
||||
this.countryName = this.value.countryName;
|
||||
this.countryCode = this.value.countryCode;
|
||||
this.provinceCode = this.value.provinceCode;
|
||||
this.cityCode = this.value.cityCode;
|
||||
this.areaCode = this.value.areaCode || this.value.regionCode;
|
||||
this.provinceName = this.value.provinceName;
|
||||
this.cityName = this.value.cityName;
|
||||
this.areaName = this.value.areaName || this.value.regionName;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
126
src/components/AnjiPlus/anji-checkbox.vue
Normal file
@@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<el-checkbox-group v-model="selectValue" class="filter-item" @change="change">
|
||||
<el-checkbox
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
:disabled="disabled"
|
||||
>{{ item.text }}</el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from "@/utils/request";
|
||||
export default {
|
||||
props: {
|
||||
dictCode: null, // 当传入dictCode时,可以不用传递url
|
||||
url: null,
|
||||
value: null,
|
||||
placeholder: null,
|
||||
label: {
|
||||
type: String,
|
||||
default: "text"
|
||||
},
|
||||
option: {
|
||||
type: String,
|
||||
default: "id"
|
||||
},
|
||||
multiple: null,
|
||||
localOptions: null,
|
||||
disabled: null,
|
||||
clearable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
collapseTags: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options: null,
|
||||
selectValue: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 根据dictCode和url拼出最终的请求url
|
||||
requestUrl() {
|
||||
if (this.url != null && this.url.trim() != "") {
|
||||
return this.url;
|
||||
}
|
||||
if (this.dictCode != null && this.dictCode.trim() != "") {
|
||||
return `/tms/gaeaDict/select/${this.dictCode}`;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value: function(val, oldVal) {
|
||||
this.echoCheckboxValue(val);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.echoCheckboxValue(this.value);
|
||||
if (this.requestUrl == null) {
|
||||
this.options = this.localOptions;
|
||||
return;
|
||||
}
|
||||
this.queryData();
|
||||
},
|
||||
methods: {
|
||||
change(value) {
|
||||
const strValue = value.join(",");
|
||||
if (value === "") {
|
||||
value = null;
|
||||
}
|
||||
this.$emit("input", strValue);
|
||||
this.$emit("change", strValue, this.options);
|
||||
},
|
||||
// 从本地localStorage取 gaeaDict
|
||||
getOptionsFromLocalStorage() {
|
||||
let dicts = JSON.parse(localStorage.getItem("AJReportDict"));
|
||||
let options = [];
|
||||
if (!dicts.hasOwnProperty(this.dictCode)) {
|
||||
return [];
|
||||
}
|
||||
let dictItems = dicts[this.dictCode];
|
||||
for (let i = 0; i < dictItems.length; i++) {
|
||||
let dictItem = dictItems[i];
|
||||
options.push({ id: dictItem.id.toString(), text: dictItem.text });
|
||||
}
|
||||
return options;
|
||||
},
|
||||
queryData() {
|
||||
// 所有从本地localStorage取,因为在App.vue中已经请求远程保存到本地了
|
||||
let options = this.getOptionsFromLocalStorage();
|
||||
if (this.isNotBlank(options)) {
|
||||
this.options = options;
|
||||
return;
|
||||
}
|
||||
// 本地localStorage取不到,再从远程接口取
|
||||
if (this.requestUrl == null) {
|
||||
return;
|
||||
}
|
||||
request({
|
||||
url: this.requestUrl,
|
||||
params: {
|
||||
multiple: this.multiple == null ? null : 1
|
||||
}
|
||||
}).then(response => {
|
||||
this.options = response.data;
|
||||
});
|
||||
},
|
||||
// 回显
|
||||
echoCheckboxValue(val) {
|
||||
if (!val) {
|
||||
this.selectValue = [];
|
||||
} else {
|
||||
const arr = val.split(",");
|
||||
this.selectValue = arr;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
50
src/components/AnjiPlus/anji-contextMenu.vue
Normal file
@@ -0,0 +1,50 @@
|
||||
<!--
|
||||
* @Descripttion: 右键菜单
|
||||
* @version:
|
||||
* @Author: qianlishi
|
||||
* @Date: 2021-10-21 15:52:03
|
||||
* @LastEditors: qianlishi
|
||||
* @LastEditTime: 2021-10-21 19:40:05
|
||||
-->
|
||||
<template>
|
||||
<div v-show="visible" class="contentmenu" :style="styleObj">
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
styleObj: Object,
|
||||
visible: Boolean,
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
watch: {
|
||||
visible(value) {
|
||||
if (value) {
|
||||
document.body.addEventListener('click', this.closeMenu)
|
||||
} else {
|
||||
document.body.removeEventListener('click', this.closeMenu)
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
closeMenu() {
|
||||
this.$emit('update:visible', false)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.contentmenu {
|
||||
position: fixed;
|
||||
z-index: 99999;
|
||||
list-style: none;
|
||||
-webkit-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
||||
padding: 0;
|
||||
background: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
97
src/components/AnjiPlus/anji-countryCity.vue
Normal file
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<el-cascader v-model="selectValue" style="width: 100%" :props="{ lazy: true, lazyLoad: lazyLoad, label: 'text', value: 'id' }" :options="countryCity" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
value: null,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['countryCity']),
|
||||
selectValue: {
|
||||
get: function() {
|
||||
return [...this.value]
|
||||
},
|
||||
set: function(val) {
|
||||
this.$emit('update:value', val)
|
||||
},
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (this.value && this.value.length > 0) {
|
||||
this.initCity()
|
||||
} else {
|
||||
this.$store.dispatch('dict/add_countryCity', { level: 0 })
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCityName() {
|
||||
const value = this.selectValue
|
||||
const country = this.countryCity.find((item) => item.id === value[0])
|
||||
const province = country.children.find((item) => item.id === value[1])
|
||||
const city = province.children.find((item) => item.id === value[2])
|
||||
const region = city.children.find((item) => item.id === value[3])
|
||||
return [country.text, province.text, city.text, region.text]
|
||||
},
|
||||
// 初始化数据
|
||||
initCity() {
|
||||
const value = this.value
|
||||
// console.log(value)
|
||||
if (!value) {
|
||||
return
|
||||
}
|
||||
const country = this.countryCity.find((item) => item.id === value[0])
|
||||
console.log(country)
|
||||
if (!country || !country.children) {
|
||||
this.getData().then((list) => {
|
||||
this.getData({ country: value[0], level: 1 }).then((list) => {
|
||||
this.getData({ country: value[0], province: value[1], level: 2 }).then((list) => {
|
||||
this.getData({ country: value[0], province: value[1], city: value[2], level: 3, update: true }).then((list) => {})
|
||||
})
|
||||
})
|
||||
})
|
||||
} else {
|
||||
const province = country.children.find((item) => item.id === value[1])
|
||||
if (!province || !province.children) {
|
||||
this.getData({ country: value[0], level: 1 }).then((list) => {
|
||||
this.getData({ country: value[0], province: value[1], level: 2 }).then((list) => {
|
||||
this.getData({ country: value[0], province: value[1], city: value[2], level: 3, update: true }).then((list) => {})
|
||||
})
|
||||
})
|
||||
} else {
|
||||
const city = province.children.find((item) => item.id === value[2])
|
||||
if (!city || !city.children) {
|
||||
this.getData({ country: value[0], province: value[1], level: 2 }).then((list) => {
|
||||
this.getData({ country: value[0], province: value[1], city: value[2], level: 3, update: true }).then((list) => {})
|
||||
})
|
||||
} else {
|
||||
const region = city.children.find((item) => item.id === value[3])
|
||||
if (!region) {
|
||||
this.getData({ country: value[0], province: value[1], city: value[2], level: 3, update: true }).then((list) => {})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
getData(params) {
|
||||
return this.$store.dispatch('dict/add_countryCity', params)
|
||||
},
|
||||
lazyLoad(node, resolve) {
|
||||
console.log(node)
|
||||
const { level, path, data } = node
|
||||
if (data && data.children) {
|
||||
resolve(data.children)
|
||||
} else {
|
||||
if (level === 0) {
|
||||
return
|
||||
}
|
||||
const params = { country: path[0], province: path[1], city: path[2], level }
|
||||
this.$store.dispatch('dict/add_countryCity', params).then((list) => resolve(list))
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
1106
src/components/AnjiPlus/anji-crud/anji-crud.vue
Normal file
507
src/components/AnjiPlus/anji-crud/edit-form.vue
Normal file
@@ -0,0 +1,507 @@
|
||||
<template>
|
||||
<div
|
||||
v-if="option['hide'] == null || option['hide'] == false"
|
||||
class="anji-card"
|
||||
>
|
||||
<div class="card-head">
|
||||
{{ option.title }}
|
||||
<div class="main-card-header-button">
|
||||
<el-button type="text" @click="handleSetRowColNum(4)">||||</el-button>
|
||||
<el-button type="text" @click="handleSetRowColNum(3)">|||</el-button>
|
||||
<el-button type="text" @click="handleSetRowColNum(2)">||</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<el-form
|
||||
ref="editForm"
|
||||
:model="editForm"
|
||||
:label-width="option.labelWidth || '100px'"
|
||||
>
|
||||
<!--:disabled="modelType == 'view'"-->
|
||||
<template v-for="group in columnGroups">
|
||||
<el-divider v-if="groupModel" :key="group" content-position="left">{{
|
||||
group
|
||||
}}</el-divider>
|
||||
<el-row :key="group" class="form_table">
|
||||
<template v-for="item in groupFormFields[group]">
|
||||
<el-col
|
||||
v-if="fieldIsHide(item.editHide) == false"
|
||||
:key="item.editField"
|
||||
:span="
|
||||
item.rowColSpan == null ? cardRowColSpan : item.rowColSpan
|
||||
"
|
||||
>
|
||||
<el-form-item
|
||||
:label="item.label"
|
||||
:rules="item.rules"
|
||||
:prop="item.editField"
|
||||
:disabled="item.disabled"
|
||||
>
|
||||
<!-- 输入框 -->
|
||||
<span
|
||||
v-if="item.tips != '' && item.tips != null"
|
||||
:style="{ 'margin-left': '-13px' }"
|
||||
class="input_tips"
|
||||
>
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
:content="item.tips"
|
||||
placement="top-start"
|
||||
>
|
||||
<svg-icon icon-class="tishi-yiwen" />
|
||||
</el-tooltip>
|
||||
</span>
|
||||
<el-input
|
||||
v-if="item.inputType == 'input'"
|
||||
v-model.trim="editForm[item.editField]"
|
||||
:placeholder="item.placeholder || '请输入'"
|
||||
:clearable="item.clearable !== false"
|
||||
:disabled="fieldIsDisable(item.disabled)"
|
||||
@change="value => formChange(item.editField, value, null)"
|
||||
/>
|
||||
<!-- 开关 -->
|
||||
<el-switch
|
||||
v-else-if="item.inputType == 'switch'"
|
||||
v-model.trim="editForm[item.editField]"
|
||||
:disabled="fieldIsDisable(item.disabled)"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
inactive-color="#ccc"
|
||||
active-color="#5887fb"
|
||||
@change="value => formChange(item.editField, value, null)"
|
||||
/>
|
||||
<el-input-number
|
||||
v-else-if="item.inputType == 'input-number'"
|
||||
v-model.trim="editForm[item.editField]"
|
||||
:min="item.inputNumberOption.min"
|
||||
:max="item.inputNumberOption.max"
|
||||
:placeholder="item.placeholder || '请输入'"
|
||||
:clearable="item.clearable !== false"
|
||||
:disabled="fieldIsDisable(item.disabled)"
|
||||
@change="value => formChange(item.editField, value, null)"
|
||||
/>
|
||||
<!-- 自定义input -->
|
||||
<anji-input
|
||||
v-else-if="item.inputType == 'anji-input'"
|
||||
v-model.trim="editForm[item.editField]"
|
||||
:unit="item.anjiInput.unit"
|
||||
:default-unit="item.anjiInput.defaultUnit"
|
||||
:placeholder="item.placeholder || '请输入'"
|
||||
:clearable="item.clearable !== false"
|
||||
:disabled="fieldIsDisable(item.disabled)"
|
||||
@change="value => formChange(item.editField, value, null)"
|
||||
/>
|
||||
<!-- 下拉框 -->
|
||||
<anji-select
|
||||
v-else-if="item.inputType == 'anji-select'"
|
||||
v-model.trim="editForm[item.editField]"
|
||||
:allow-create="item.anjiSelectOption.allowCreate"
|
||||
:multiple="item.anjiSelectOption.multiple"
|
||||
:disabled="fieldIsDisable(item.disabled)"
|
||||
:dict-code="item.anjiSelectOption.dictCode"
|
||||
:placeholder="item.placeholder"
|
||||
:url="item.anjiSelectOption.url"
|
||||
:method="item.anjiSelectOption.method"
|
||||
:query-param="item.anjiSelectOption.queryParam"
|
||||
:merge-label="item.anjiSelectOption.mergeLabel"
|
||||
:option="item.anjiSelectOption.option"
|
||||
:label="item.anjiSelectOption.label"
|
||||
:remote-filter="item.anjiSelectOption.remoteFilter"
|
||||
:disabled-options="item.anjiSelectOption.disabledOptions"
|
||||
:select-keyword="item.anjiSelectOption.selectKeyword"
|
||||
@change="
|
||||
(value, option) =>
|
||||
formChange(item.editField, value, option)
|
||||
"
|
||||
/>
|
||||
<!-- 日期时间框 -->
|
||||
<el-date-picker
|
||||
v-else-if="item.inputType.indexOf('date') >= 0"
|
||||
v-model="editForm[item.editField]"
|
||||
style="width: 100%"
|
||||
:placeholder="item.placeholder || '请选择'"
|
||||
:type="item.inputType"
|
||||
:format="item.format"
|
||||
:value-format="item.valueFormat"
|
||||
:disabled="fieldIsDisable(item.disabled)"
|
||||
:clearable="item.clearable !== false"
|
||||
@change="value => formChange(item.editField, value, null)"
|
||||
/>
|
||||
<!-- checkbox -->
|
||||
<anji-checkbox
|
||||
v-else-if="item.inputType == 'checkbox'"
|
||||
v-model.trim="editForm[item.editField]"
|
||||
:dict-code="item.anjiCheckbox.dictCode"
|
||||
:url="item.anjiCheckbox.url"
|
||||
:label="item.anjiCheckbox.label"
|
||||
:disabled="fieldIsDisable(item.disabled)"
|
||||
@change="
|
||||
(value, options) =>
|
||||
formChange(item.editField, value, options)
|
||||
"
|
||||
/>
|
||||
<!-- 城市三级联动 -->
|
||||
<anji-cascader
|
||||
v-else-if="item.inputType == 'anji-cascader'"
|
||||
v-model.trim="editForm[item.editField]"
|
||||
:disabled="fieldIsDisable(item.disabled)"
|
||||
:single-display="item.anjiCascader.singleDisplay"
|
||||
:url="item.anjiCascader.url"
|
||||
@change="value => formChange(item.editField, value, null)"
|
||||
/>
|
||||
<!-- 上传组件 -->
|
||||
<anji-upload
|
||||
v-else-if="item.inputType == 'anji-upload'"
|
||||
v-model.trim="editForm[item.editField]"
|
||||
:up-load-url="item.anjiUpload.upLoadUrl"
|
||||
:view-url="item.anjiUpload.viewUrl"
|
||||
:upload-type="item.anjiUpload.uploadType"
|
||||
:limit="item.anjiUpload.limit"
|
||||
@change="value => formChange(item.editField, value, null)"
|
||||
/>
|
||||
<!-- input自带输入建议 -->
|
||||
<anji-autocomplete
|
||||
v-else-if="item.inputType == 'anji-autocomplete'"
|
||||
v-model.trim="editForm[item.editField]"
|
||||
:disabled="fieldIsDisable(item.disabled)"
|
||||
:label="item.anjiAutocomplete.label"
|
||||
:option="item.anjiAutocomplete.option"
|
||||
:appoint-value="item.anjiAutocomplete.appointValue"
|
||||
:url="item.anjiAutocomplete.url"
|
||||
@change="
|
||||
(value, option) =>
|
||||
formChange(item.editField, value, option)
|
||||
"
|
||||
/>
|
||||
<!-- textarea -->
|
||||
<el-input
|
||||
v-else-if="item.inputType == 'textarea'"
|
||||
v-model.trim="editForm[item.editField]"
|
||||
:placeholder="item.placeholder || '请输入'"
|
||||
:clearable="item.clearable !== false"
|
||||
:disabled="fieldIsDisable(item.disabled)"
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
@change="value => formChange(item.editField, value, null)"
|
||||
/>
|
||||
<!-- 城市四级联动 -->
|
||||
<anji-fourlevel
|
||||
v-else-if="item.inputType == 'anji-country'"
|
||||
v-model.trim="editForm[item.editField]"
|
||||
@change="value => formChange(item.editField, value, null)"
|
||||
/>
|
||||
<el-input
|
||||
v-else
|
||||
placeholder="组件不支持此类型表单请至组件内部自行扩展"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
modelType: String, // add view edit
|
||||
showDialog: Boolean,
|
||||
option: {
|
||||
// 界面渲染相关配置json
|
||||
type: [Object],
|
||||
default: () => {
|
||||
return {
|
||||
title: "", // 页面标题
|
||||
labelWidth: "", // 表单输入框label宽度
|
||||
queryFormFields: [], // 查询表单条件
|
||||
buttons: {
|
||||
// 按钮
|
||||
query: {},
|
||||
edit: {},
|
||||
delete: {},
|
||||
add: {}
|
||||
},
|
||||
columns: [], // 表格列
|
||||
formChange: (formData, fieldName, fieldVal, fieldExtend) => {} // 弹出框表单修改回调
|
||||
};
|
||||
}
|
||||
},
|
||||
// 当relateData不为空时,该组件是渲染与relateData一对一关联的子表信息
|
||||
relateData: {
|
||||
type: [Object],
|
||||
default: () => {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
value: {
|
||||
type: [Object],
|
||||
default: () => {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cardRowColNum: this.option.rowColForm || 2, // 主信息一行显示几列
|
||||
editForm: {} // 提交表单的数据
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 主键的列名
|
||||
primaryKeyFieldName() {
|
||||
let primaryKey = this.option.columns.find(
|
||||
item => item["primaryKey"] == true
|
||||
);
|
||||
if (primaryKey != null) {
|
||||
return primaryKey["field"];
|
||||
} else {
|
||||
return null;
|
||||
console.warn(
|
||||
"在columns中查找primaryKey=true失败,会导致查询详情和删除失败"
|
||||
);
|
||||
}
|
||||
},
|
||||
// 指定当前实体关联主表的
|
||||
joinColumn() {
|
||||
let columnName = this.option.joinColumn;
|
||||
if (this.isBlank(columnName)) {
|
||||
console.warn(
|
||||
"在joinEntity中查找joinColumn属性失败,会导致查询详情和删除失败"
|
||||
);
|
||||
columnName = "";
|
||||
}
|
||||
return columnName;
|
||||
},
|
||||
// 提交表单中所有的列,因部分翻译字段,表格中和表单中的key不一样,field editField不全,这里补全下,
|
||||
formFields() {
|
||||
if (this.option.columns == null) {
|
||||
return [];
|
||||
}
|
||||
let fields = this.deepClone(this.option.columns);
|
||||
fields = fields.map(item => {
|
||||
if (this.isBlank(item["editField"])) {
|
||||
item["editField"] = item["field"];
|
||||
}
|
||||
// 没有设定分组的,全部补全成 其它信息
|
||||
if (this.isBlank(item["group"])) {
|
||||
item["group"] = "其它";
|
||||
}
|
||||
return item;
|
||||
});
|
||||
return fields;
|
||||
},
|
||||
// 卡片设定中一行显示几列,每列的col数
|
||||
cardRowColSpan() {
|
||||
return 24 / this.cardRowColNum;
|
||||
},
|
||||
// 如果表单内容较多,启用了分组,这里先算出所有的分组
|
||||
columnGroups() {
|
||||
if (this.isBlank(this.formFields)) {
|
||||
return [];
|
||||
} else {
|
||||
// 找出所有hide != true的关联表
|
||||
let groups = this.formFields
|
||||
.map(item => {
|
||||
return item["group"];
|
||||
})
|
||||
.filter((currentValue, index, arr) => {
|
||||
return arr.indexOf(currentValue) == index;
|
||||
});
|
||||
return groups;
|
||||
}
|
||||
},
|
||||
/* {
|
||||
'分组1': [{column1.1}],
|
||||
'分组2': [{column2.1}],
|
||||
}*/
|
||||
groupFormFields() {
|
||||
if (this.showDialog) {
|
||||
// 将每个分组初始化
|
||||
let groupFormFields = {};
|
||||
this.columnGroups.forEach((value, index, array) => {
|
||||
groupFormFields[value] = [];
|
||||
});
|
||||
// 将所有编辑列,按分组存放
|
||||
this.formFields.forEach((item, index, array) => {
|
||||
groupFormFields[item["group"]].push(item);
|
||||
});
|
||||
return groupFormFields;
|
||||
}
|
||||
return [];
|
||||
},
|
||||
groupModel() {
|
||||
return this.columnGroups.length > 1;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 如果表单,是做为主表的编辑页面,如果是通过v-model传递进来的值,通过监听value,更新this.editForm
|
||||
this.$watch(
|
||||
function() {
|
||||
return this.value;
|
||||
},
|
||||
function(newVal, oldVal) {
|
||||
this.editForm = newVal;
|
||||
// 通过v-model传递值进来时,说明当前form是主表信息
|
||||
this.formChange();
|
||||
}
|
||||
);
|
||||
// 如果表单,是做为子表的编辑页面,当relateData中的关联字段发生更新时,触发查询,比如在goods详情中,goodsCode
|
||||
this.$watch(
|
||||
function() {
|
||||
return this.relateData[this.joinColumn];
|
||||
},
|
||||
function(newVal, oldVal) {
|
||||
// 如果是父组件(弹出框)关闭时,设置this.relateData = {}时触发,清空本组件的数据
|
||||
if (this.isBlank(this.relateData)) {
|
||||
this.cardRowColNum = 2;
|
||||
this.editForm = {};
|
||||
return;
|
||||
}
|
||||
// 如果是关联字段发生更新,触发查询
|
||||
if (this.isNotBlank(newVal)) {
|
||||
this.queryDetail();
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
mounted() {
|
||||
// 如果表单,是做为主表的编辑页面,如果是通过v-model传递进来的值
|
||||
if (this.isNotBlank(this.value)) {
|
||||
this.editForm = this.value;
|
||||
this.formChange();
|
||||
}
|
||||
// 如果表单,是做为子表的编辑页面,首次打开时,根据关联属性,加载详情数据
|
||||
if (
|
||||
this.isNotBlank(this.relateData) &&
|
||||
this.isNotBlank(this.relateData[this.joinColumn])
|
||||
) {
|
||||
this.queryDetail();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 该行是否显示 true/false/ 'hideOnAdd hideOnView hideOnEdit'
|
||||
fieldIsHide(editHide) {
|
||||
if (typeof editHide == "boolean") {
|
||||
return editHide;
|
||||
}
|
||||
if (typeof editHide == "string") {
|
||||
if (this.modelType == "add") {
|
||||
return editHide.indexOf("hideOnAdd") >= 0;
|
||||
}
|
||||
if (this.modelType == "view") {
|
||||
return editHide.indexOf("hideOnView") >= 0;
|
||||
}
|
||||
if (this.modelType == "edit") {
|
||||
return editHide.indexOf("hideOnEdit") >= 0;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
// 该行是否禁用 true/false/ 'disableOnAdd disableOnView disableOnEdit'
|
||||
fieldIsDisable(disable) {
|
||||
if (typeof disable == "boolean") {
|
||||
return disable;
|
||||
}
|
||||
if (typeof disable == "string") {
|
||||
if (this.modelType == "add") {
|
||||
return disable.indexOf("disableOnAdd") >= 0;
|
||||
}
|
||||
if (this.modelType == "view") {
|
||||
return disable.indexOf("disableOnView") >= 0;
|
||||
}
|
||||
if (this.modelType == "edit") {
|
||||
return disable.indexOf("disableOnEdit") >= 0;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
// 设置一行显示几列
|
||||
handleSetRowColNum(num) {
|
||||
this.cardRowColNum = num;
|
||||
this.$emit("changeRowColNum", num);
|
||||
},
|
||||
|
||||
async queryDetail() {
|
||||
let queryParams = this.relateData;
|
||||
const { data, code } = await this.option.buttons.queryByPrimarykey.api(
|
||||
queryParams
|
||||
);
|
||||
if (code != "200") return;
|
||||
this.editForm = data;
|
||||
this.formChange();
|
||||
},
|
||||
// 校验表单
|
||||
validate(callback) {
|
||||
this.$refs.editForm.validate(async (valid, obj) => {
|
||||
if (callback != null) {
|
||||
callback(valid);
|
||||
}
|
||||
});
|
||||
},
|
||||
handleSave(callback) {
|
||||
this.$refs.editForm.validate(async (valid, obj) => {
|
||||
if (valid) {
|
||||
if (this.modelType == "add") {
|
||||
// 当edit-from是作为关联子表的界面,补全关联属性
|
||||
if (typeof this.option.beforeInsert == "function") {
|
||||
this.option.beforeInsert(this.relateData, this.editForm);
|
||||
}
|
||||
const { code, message } = await this.option.buttons.add.api(
|
||||
this.editForm
|
||||
);
|
||||
if (code == "200") {
|
||||
if (callback != null) {
|
||||
callback();
|
||||
}
|
||||
} else {
|
||||
console.log(`提交表单调用新增接口失败:${message}`);
|
||||
}
|
||||
} else {
|
||||
// 当edit-from是作为关联子表的界面,补全关联属性
|
||||
if (typeof this.option.beforeUpdate == "function") {
|
||||
this.option.beforeUpdate(this.relateData, this.editForm);
|
||||
}
|
||||
const { code, message } = await this.option.buttons.edit.api(
|
||||
this.editForm
|
||||
);
|
||||
if (code == "200") {
|
||||
if (callback != null) {
|
||||
callback();
|
||||
}
|
||||
} else {
|
||||
console.log(`提交表单调用更新接口失败:${message}`);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log("表单校验失败");
|
||||
}
|
||||
});
|
||||
},
|
||||
// 表单任何一个变动时,通知外部v-model
|
||||
formChange(fieldName, fieldVal, fieldExtend) {
|
||||
this.$emit("input", this.editForm);
|
||||
// 表单变动后,回调option中的formChange事件
|
||||
if (typeof this.option.formChange == "function") {
|
||||
this.option.formChange(this.editForm, fieldName, fieldVal, fieldExtend);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.input_tips {
|
||||
position: absolute;
|
||||
margin-top: -8px;
|
||||
.svg-icon {
|
||||
font-size: 20px;
|
||||
color: rgb(71, 8, 8);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
514
src/components/AnjiPlus/anji-crud/edit-table.vue
Normal file
@@ -0,0 +1,514 @@
|
||||
<template>
|
||||
<div
|
||||
v-if="option['hide'] == null || option['hide'] == false"
|
||||
class="anji-card"
|
||||
>
|
||||
<div class="card-head">{{ option.title }}</div>
|
||||
<div class="card-body">
|
||||
<el-form ref="form" :model="form">
|
||||
<!-- 表格开始 -->
|
||||
<el-table
|
||||
:data="formRecordsUndelete"
|
||||
border
|
||||
:row-class-name="tableRowClassAdapter"
|
||||
@selection-change="handleSelectionChange"
|
||||
@row-click="handleTableRowClick"
|
||||
>
|
||||
<el-table-column label="序号" min-width="50" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.$index + 1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<template v-for="item in option.columns">
|
||||
<el-table-column
|
||||
v-if="
|
||||
fieldIsHide(item.tableHide) != true &&
|
||||
item.columnType != 'expand'
|
||||
"
|
||||
:key="item.field"
|
||||
:label="item.label"
|
||||
:min-width="item.minWidth || 110"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-form-item
|
||||
:prop="'records.' + scope.$index + '.' + item.field"
|
||||
:rules="item.rules"
|
||||
>
|
||||
<!-- 输入框 -->
|
||||
<el-input
|
||||
v-if="item.inputType == 'input'"
|
||||
v-model="scope.row[item.field]"
|
||||
size="small"
|
||||
:placeholder="item.placeholder || '请输入'"
|
||||
:clearable="item.clearable !== false"
|
||||
:disabled="
|
||||
saveButtonStatus[scope.$index] == 'inShow' ||
|
||||
item.disabled
|
||||
"
|
||||
@change="
|
||||
value => tableRowChange(scope.$index, item.field, value)
|
||||
"
|
||||
/>
|
||||
<!-- 开关 -->
|
||||
<el-switch
|
||||
v-else-if="item.inputType == 'switch'"
|
||||
v-model="scope.row[item.field]"
|
||||
:disabled="
|
||||
saveButtonStatus[scope.$index] == 'inShow' ||
|
||||
item.disabled
|
||||
"
|
||||
:active-value="item.switchOption.disableValue"
|
||||
:inactive-value="item.switchOption.enableValue"
|
||||
@change="
|
||||
value => tableRowChange(scope.$index, item.field, value)
|
||||
"
|
||||
active-color="#5887fb"
|
||||
inactive-color="#ccc"
|
||||
>
|
||||
</el-switch>
|
||||
<el-input
|
||||
v-else-if="item.inputType == 'input-number'"
|
||||
v-model="scope.row[item.field]"
|
||||
size="small"
|
||||
:min="item.inputNumberOption.min"
|
||||
:max="item.inputNumberOption.max"
|
||||
:placeholder="item.placeholder || '请输入'"
|
||||
:clearable="item.clearable !== false"
|
||||
:disabled="
|
||||
saveButtonStatus[scope.$index] == 'inShow' ||
|
||||
item.disabled
|
||||
"
|
||||
@change="
|
||||
value => tableRowChange(scope.$index, item.field, value)
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- 自定义input -->
|
||||
<anji-input
|
||||
v-else-if="item.inputType == 'anji-input'"
|
||||
v-model.trim="scope.row[item.field]"
|
||||
:default-value="item.defaultValue"
|
||||
:unit="item.anjiInput.unit"
|
||||
:conversion="item.anjiInput.conversion"
|
||||
:placeholder="item.placeholder || '请输入'"
|
||||
:clearable="item.clearable !== false"
|
||||
:disabled="
|
||||
saveButtonStatus[scope.$index] == 'inShow' ||
|
||||
item.disabled
|
||||
"
|
||||
@change="
|
||||
value => tableRowChange(scope.$index, item.field, value)
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- 下拉框 -->
|
||||
<anji-select
|
||||
v-else-if="item.inputType == 'anji-select'"
|
||||
v-model.trim="scope.row[item.field]"
|
||||
:multiple="item.anjiSelectOption.multiple"
|
||||
:default-value="item.defaultValue"
|
||||
:dict-code="item.anjiSelectOption.dictCode"
|
||||
:url="item.anjiSelectOption.url"
|
||||
:method="item.anjiSelectOption.method"
|
||||
:query-param="item.anjiSelectOption.queryParam"
|
||||
:option="item.anjiSelectOption.option"
|
||||
:label="item.anjiSelectOption.label"
|
||||
:disabled-options="item.anjiSelectOption.disabledOptions"
|
||||
:disabled="
|
||||
saveButtonStatus[scope.$index] == 'inShow' ||
|
||||
item.disabled
|
||||
"
|
||||
@change="
|
||||
(value, option) =>
|
||||
tableRowChange(scope.$index, item.field, value, option)
|
||||
"
|
||||
/>
|
||||
<!-- 日期时间框 -->
|
||||
<el-date-picker
|
||||
v-else-if="item.inputType.indexOf('date') >= 0"
|
||||
v-model="scope.row[item.field]"
|
||||
style="width: 100%"
|
||||
:placeholder="item.placeholder || '请选择'"
|
||||
:type="item.inputType"
|
||||
:clearable="item.clearable !== false"
|
||||
:disabled="
|
||||
saveButtonStatus[scope.$index] == 'inShow' ||
|
||||
item.disabled
|
||||
"
|
||||
@change="
|
||||
value => tableRowChange(scope.$index, item.field, value)
|
||||
"
|
||||
/>
|
||||
<!-- 待扩展的表单类型,请自行扩展 -->
|
||||
<el-input
|
||||
v-else
|
||||
placeholder="组件不支持此类型表单请至组件内部自行扩展"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column fixed="right" label="操作" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="handleAddOrUpdate(scope.row, scope.$index)"
|
||||
>{{ getRowEditButton(scope.$index) }}</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="handleDelete(scope.row, scope.$index)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 表格结束 -->
|
||||
</el-form>
|
||||
<button
|
||||
v-if="modelType != 'view'"
|
||||
class="table-add-row-button"
|
||||
@click="handleAdd"
|
||||
>
|
||||
<i class="el-icon-plus" />
|
||||
<span>新增</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const ROW_DELETE_FLAG = "deletedFlag";
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
modelType: String, // add view edit
|
||||
option: {
|
||||
// 界面渲染相关配置json
|
||||
type: [Object],
|
||||
default: () => {
|
||||
return {
|
||||
title: "", // 页面标题
|
||||
labelWidth: "",
|
||||
queryFormFields: [], // 查询表单条件
|
||||
buttons: {
|
||||
// 按钮
|
||||
query: {},
|
||||
edit: {},
|
||||
delete: {},
|
||||
add: {}
|
||||
},
|
||||
columns: [] // 表格列
|
||||
};
|
||||
}
|
||||
},
|
||||
relateData: {
|
||||
// 关联的主记录
|
||||
type: [Object],
|
||||
default: () => {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
value: {
|
||||
type: [Array],
|
||||
default: () => {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
valueNew: {
|
||||
type: [Array],
|
||||
default: () => {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
checkRecords: [], // 表格中当前选中的记录
|
||||
|
||||
form: {
|
||||
records: [], // 接口返回的记录列表
|
||||
total: 0 // 接口返回的总条数
|
||||
},
|
||||
|
||||
saveButtonStatus: [], // 维护表格中每行编辑按钮的状态 inShow inEditing inAdding
|
||||
|
||||
rowIdList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 主键的列名
|
||||
primaryKeyFieldName() {
|
||||
let primaryKey = this.option.columns.find(
|
||||
item => item["primaryKey"] == true
|
||||
);
|
||||
if (primaryKey != null) {
|
||||
return primaryKey["field"];
|
||||
} else {
|
||||
return null;
|
||||
console.warn(
|
||||
"在columns中查找primaryKey=true失败,会导致查询详情和删除失败"
|
||||
);
|
||||
}
|
||||
},
|
||||
// 指定当前实体关联主表的关联字段,孙子关联表,没有该属性
|
||||
joinColumn() {
|
||||
let columnName = this.option.joinColumn;
|
||||
if (this.isBlank(columnName)) {
|
||||
console.warn(
|
||||
"在columns中查找关联字段失败,会导致查询详情和删除失败,孙子关联表忽略该错误"
|
||||
);
|
||||
columnName = "";
|
||||
}
|
||||
return columnName;
|
||||
},
|
||||
// 未删除的记录
|
||||
formRecordsUndelete() {
|
||||
if (this.form.records == null) {
|
||||
return [];
|
||||
}
|
||||
return this.form.records.filter(
|
||||
item => item[ROW_DELETE_FLAG] == null || item[ROW_DELETE_FLAG] == false
|
||||
);
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
created() {
|
||||
// 主表 relateData 的关联字段 joinColumn 变动时,触发查询子表的查询,孙子关联儿子的无效
|
||||
if (this.isNotBlank(this.joinColumn)) {
|
||||
this.$watch(
|
||||
function() {
|
||||
return this.relateData[this.joinColumn];
|
||||
},
|
||||
function(newVal, oldVal) {
|
||||
// 如果是关联字段发生更新,触发查询
|
||||
if (this.isNotBlank(newVal)) {
|
||||
this.handleQueryPageList(newVal);
|
||||
} else {
|
||||
// 如果关联字段为空,清空本表格的数据,如果是父组件(弹出框)关闭时,设置this.relateData = {默认值}时触发
|
||||
this.checkRecords = [];
|
||||
this.form.records = [];
|
||||
this.form.total = 0;
|
||||
this.saveButtonStatus = [];
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 首次打开时,根据主表关联字段查询子表,加载表格数据
|
||||
if (
|
||||
this.isNotBlank(this.relateData) &&
|
||||
this.isNotBlank(this.relateData[this.joinColumn])
|
||||
) {
|
||||
this.handleQueryPageList();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 该行是否显示 true/false/ 'hideOnAdd hideOnView hideOnEdit'
|
||||
fieldIsHide(tableHide) {
|
||||
if (typeof tableHide == "boolean") {
|
||||
return tableHide;
|
||||
}
|
||||
if (typeof tableHide == "string") {
|
||||
if (this.modelType == "add") {
|
||||
return tableHide.indexOf("hideOnAdd") >= 0;
|
||||
}
|
||||
if (this.modelType == "view") {
|
||||
return tableHide.indexOf("hideOnView") >= 0;
|
||||
}
|
||||
if (this.modelType == "edit") {
|
||||
return tableHide.indexOf("hideOnEdit") >= 0;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
// 获取行的提交按钮文字
|
||||
getRowEditButton(index) {
|
||||
if (this.saveButtonStatus[index] == "inEditing") {
|
||||
return "btn_savetemp";
|
||||
} else if (this.saveButtonStatus[index] == "inAdding") {
|
||||
return "btn_savetemp";
|
||||
} else if (this.saveButtonStatus[index] == "inShow") {
|
||||
return "btn_edit";
|
||||
} else {
|
||||
return "not_permission";
|
||||
}
|
||||
},
|
||||
// 表格行渲染前前置处理
|
||||
tableRowClassAdapter({ row, rowIndex }) {
|
||||
row.index = rowIndex;
|
||||
},
|
||||
// 查询
|
||||
async handleQueryPageList(joinColumnValue) {
|
||||
if (this.isBlank(joinColumnValue)) {
|
||||
joinColumnValue = this.relateData[this.joinColumn];
|
||||
}
|
||||
let params = {};
|
||||
params[this.joinColumn] = joinColumnValue;
|
||||
this.queryPageList(params);
|
||||
},
|
||||
// 暴露给外部直接调用带参数
|
||||
async queryPageList(params) {
|
||||
// 默认的排序
|
||||
if (this.isNotBlank(this.option.buttons.query.order)) {
|
||||
params["sort"] = this.option.buttons.query.sort;
|
||||
params["order"] = this.option.buttons.query.order;
|
||||
}
|
||||
const { data, code } = await this.option.buttons.query.api(params);
|
||||
if (code != "200") return;
|
||||
this.form.records = data.records;
|
||||
this.form.total = data.total;
|
||||
this.$emit("input", this.form.records);
|
||||
for (let i = 0; i < this.form.total; i++) {
|
||||
this.saveButtonStatus.push("inShow");
|
||||
}
|
||||
},
|
||||
// 选择项改变时
|
||||
handleSelectionChange(val) {
|
||||
this.checkRecords = val;
|
||||
},
|
||||
// 表格选中某一行时
|
||||
handleTableRowClick(row, column, event) {
|
||||
// 行点击后,回调option中的tableRowClick事件
|
||||
if (typeof this.option.tableRowClick == "function") {
|
||||
this.option.tableRowClick(
|
||||
this.form.records,
|
||||
row,
|
||||
row.index,
|
||||
this.relateData
|
||||
);
|
||||
}
|
||||
},
|
||||
// 行数据更新时回调
|
||||
tableRowChange(rowIndex, fieldName, fieldVal, fieldExtend) {
|
||||
// 通知外面的组件
|
||||
this.$emit("input", this.form.records);
|
||||
|
||||
// 表单变动后,回调option中的tableRowChange事件
|
||||
if (typeof this.option.tableChange == "function") {
|
||||
this.option.tableChange(
|
||||
this.form.records,
|
||||
rowIndex,
|
||||
fieldName,
|
||||
fieldVal,
|
||||
fieldExtend,
|
||||
this.relateData
|
||||
);
|
||||
}
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.saveButtonStatus.push("inAdding");
|
||||
this.form.records.push({});
|
||||
},
|
||||
// 父节点Change,子节点表格更新
|
||||
handleUpdata() {
|
||||
this.saveButtonStatus = [];
|
||||
this.form.records = [];
|
||||
},
|
||||
// 提交和修改
|
||||
handleAddOrUpdate(row, index) {
|
||||
// 编辑状态下点击保存提交
|
||||
if (
|
||||
this.saveButtonStatus[index] == "inEditing" ||
|
||||
this.saveButtonStatus[index] == "inAdding"
|
||||
) {
|
||||
this.handleSaveTemp(row, index);
|
||||
} else {
|
||||
this.$set(this.saveButtonStatus, index, "inEditing");
|
||||
}
|
||||
},
|
||||
// 校验表单
|
||||
validate(callback) {
|
||||
this.$refs["form"].validate(async (valid, obj) => {
|
||||
if (callback != null) {
|
||||
callback(valid);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 暂存
|
||||
async handleSaveTemp(row, index) {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.isBlank(row[this.primaryKeyFieldName])) {
|
||||
// 补全关联属性
|
||||
if (typeof this.option.beforeInsert == "function") {
|
||||
this.option.beforeInsert(this.relateData, row);
|
||||
}
|
||||
} else {
|
||||
// 补全关联属性
|
||||
if (typeof this.option.beforeUpdate == "function") {
|
||||
this.option.beforeUpdate(this.relateData, row);
|
||||
}
|
||||
}
|
||||
// 将行按钮的文字改成编辑
|
||||
this.$set(this.saveButtonStatus, index, "inShow");
|
||||
// 通知外面的组件
|
||||
this.$emit("input", this.form.records);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row, index) {
|
||||
this.saveButtonStatus.splice(index, 1); // 清空状态
|
||||
// 界面上临时新增出来的一行,还没有提交到数据库,可以直接删除
|
||||
if (this.saveButtonStatus[index] == "inAdding") {
|
||||
this.form.records.splice(index, 1);
|
||||
this.saveButtonStatus.splice(index, 1);
|
||||
this.$emit("input", this.form.records);
|
||||
return;
|
||||
}
|
||||
// if (this.isBlank(row) || this.isBlank(row[this.primaryKeyFieldName])) {
|
||||
// return
|
||||
// }
|
||||
// 将对应的行标识成删除
|
||||
// 找出该行在原始记录中的index
|
||||
let realIndex = this.form.records.findIndex(
|
||||
item => item[this.primaryKeyFieldName] == row[this.primaryKeyFieldName]
|
||||
);
|
||||
row[ROW_DELETE_FLAG] = true;
|
||||
this.$set(this.form.records, realIndex, row);
|
||||
this.$emit("input", this.form.records);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.table-add-row-button {
|
||||
width: 100%;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
border-color: #d9d9d9;
|
||||
border-style: dashed;
|
||||
line-height: 1.499;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
font-weight: 400;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
background-image: none;
|
||||
border: 1px solid transparent;
|
||||
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.015);
|
||||
cursor: pointer;
|
||||
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-ms-touch-action: manipulation;
|
||||
touch-action: manipulation;
|
||||
height: 32px;
|
||||
padding: 0 15px;
|
||||
font-size: 14px;
|
||||
border-radius: 4px;
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
background-color: #fff;
|
||||
border-color: #d9d9d9;
|
||||
}
|
||||
</style>
|
||||
404
src/components/AnjiPlus/anji-crud/edit.vue
Normal file
@@ -0,0 +1,404 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:width="dialogWidth"
|
||||
:class="dialogFullScreen ? 'full-screen' : 'notfull-screen'"
|
||||
:close-on-click-modal="false"
|
||||
center
|
||||
:visible.sync="showDialog"
|
||||
:fullscreen="dialogFullScreen"
|
||||
@close="handleCloseDialog('close')"
|
||||
>
|
||||
<template v-slot:title>
|
||||
{{ option.title + "--" + modelType }}
|
||||
<button
|
||||
type="button"
|
||||
aria-label="Close"
|
||||
class="el-dialog__headerbtn"
|
||||
style="right: 50px"
|
||||
@click="dialogFullScreen = !dialogFullScreen"
|
||||
>
|
||||
<i class="el-dialog__close el-icon el-icon-full-screen" />
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<!--主表详情信息-->
|
||||
<component
|
||||
:is="'EditForm'"
|
||||
ref="mainForm"
|
||||
v-model="saveForm"
|
||||
:option="option"
|
||||
:model-type="modelType"
|
||||
:show-dialog="showDialog"
|
||||
@changeRowColNum="handleSetRowColNum"
|
||||
/>
|
||||
|
||||
<!--关联表相关-->
|
||||
<template v-for="(item, index) in joinEntitys">
|
||||
<component
|
||||
:is="getComponentByJoinType(item.joinType, item)"
|
||||
:ref="'joinForm' + index"
|
||||
:key="index"
|
||||
v-model="saveForm[item.fieldNameInMainEntityOnSave]"
|
||||
:value-new.sync="saveForm[item.fieldNameInMainEntityOnId]"
|
||||
:option="item"
|
||||
:model-type="modelType"
|
||||
:relate-data="saveForm"
|
||||
/>
|
||||
|
||||
<!--孙子的关联表-->
|
||||
<template v-for="(grandsonItem, grandsonIndex) in item.joinEntitys">
|
||||
<component
|
||||
:is="getComponentByJoinType(grandsonItem.joinType, grandsonItem)"
|
||||
ref="grandsonForm"
|
||||
:key="index + '.' + grandsonIndex"
|
||||
:option="grandsonItem"
|
||||
:model-type="modelType"
|
||||
:relate-data="saveForm"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<!--自定义的卡片插槽-->
|
||||
<slot name="customCard" />
|
||||
|
||||
<div slot="footer" style="text-align: center">
|
||||
<slot v-if="modelType == 'edit'" name="editBtn" :rowData="rowData" />
|
||||
<el-button type="danger" plain @click="handleCloseDialog('close')"
|
||||
>关闭</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="modelType != 'view'"
|
||||
type="primary"
|
||||
plain
|
||||
@click="handleValidateAndSave"
|
||||
>保存</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import EditForm from "./edit-form";
|
||||
import EditTable from "./edit-table";
|
||||
export default {
|
||||
name: "EditDialog",
|
||||
components: { EditForm, EditTable },
|
||||
props: {
|
||||
visible: {
|
||||
type: [Boolean],
|
||||
default: () => {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
rowData: {
|
||||
// 查询参数,对应表格那行数据
|
||||
type: [Object],
|
||||
default: () => {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
// 预处理详情接口数据
|
||||
handleDetailData: {
|
||||
type: Function,
|
||||
default: data => {
|
||||
return data;
|
||||
}
|
||||
},
|
||||
// 预处理提交数据
|
||||
submitDetailData: {
|
||||
type: Function,
|
||||
default: (data, tpe) => {
|
||||
return data;
|
||||
}
|
||||
},
|
||||
modelType: String, // add view edit
|
||||
option: {
|
||||
require: true,
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
title: "", // 页面标题
|
||||
labelWidth: "", // 表单输入框label宽度
|
||||
queryFormFields: [], // 查询表单条件
|
||||
buttons: {
|
||||
// 按钮
|
||||
query: {},
|
||||
edit: {},
|
||||
delete: {},
|
||||
add: {}
|
||||
},
|
||||
columns: [] // 表格列
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showDialog: false, // 编辑详情弹框是否显示
|
||||
dialogFullScreen: false, // 弹出框全屏
|
||||
cardRowColNum: 2, // 主信息一行显示几列
|
||||
|
||||
// 提交表单的数据
|
||||
saveForm: {},
|
||||
// 已成功校验的关联表单个数
|
||||
countForValidJoinForm: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 弹出框的宽度,根据一行显示几列动态调整
|
||||
dialogWidth() {
|
||||
if (this.cardRowColNum == 2) {
|
||||
return "60%";
|
||||
}
|
||||
if (this.cardRowColNum == 3) {
|
||||
return "70%";
|
||||
}
|
||||
if (this.cardRowColNum == 4) {
|
||||
return "80%";
|
||||
}
|
||||
return "60%";
|
||||
},
|
||||
// 关联属性表
|
||||
joinEntitys() {
|
||||
if (this.isBlank(this.option.joinEntitys)) {
|
||||
return [];
|
||||
} else {
|
||||
return this.option.joinEntitys;
|
||||
}
|
||||
},
|
||||
// 一对一关联表的个数
|
||||
countJoinEntityOneToOne() {
|
||||
let entitys = this.joinEntitys.filter(
|
||||
item => item["joinType"] == "OneToOne"
|
||||
);
|
||||
if (entitys == null) {
|
||||
return 0;
|
||||
}
|
||||
return entitys.length;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 监控dialog的显示隐藏变量
|
||||
visible(newValue, oldValue) {
|
||||
this.showDialog = newValue;
|
||||
// 为主表的编辑表单,渲染上默认值
|
||||
this.initDefaultSaveForm();
|
||||
},
|
||||
rowData(newValue, oldValue) {
|
||||
if (newValue != null) {
|
||||
this.queryByPrimarykey(newValue);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 为主表的编辑表单,渲染上默认值
|
||||
this.initDefaultSaveForm();
|
||||
},
|
||||
methods: {
|
||||
// 暴露给外部crud页面,回传saveForm的值
|
||||
getSaveForm() {
|
||||
return this.saveForm;
|
||||
},
|
||||
setSaveForm(saveForm) {
|
||||
this.saveForm = saveForm;
|
||||
},
|
||||
initDefaultSaveForm() {
|
||||
// saveForm的默认值
|
||||
let defaultSaveForm = {};
|
||||
this.option.columns.forEach(item => {
|
||||
let key = item.editField;
|
||||
if (this.isBlank(key)) {
|
||||
key = item.field;
|
||||
}
|
||||
let val = item.defaultValue;
|
||||
if (this.isNotBlank(val)) {
|
||||
defaultSaveForm[key] = val;
|
||||
}
|
||||
});
|
||||
// 为主表的编辑表单,渲染上默认值
|
||||
this.saveForm = this.deepClone(defaultSaveForm);
|
||||
console.log("编辑框默认值:" + JSON.stringify(this.saveForm));
|
||||
},
|
||||
handleCloseDialog(val) {
|
||||
// 为主表的编辑表单,渲染上默认值
|
||||
this.initDefaultSaveForm();
|
||||
this.showDialog = false; // 编辑详情弹框是否显示
|
||||
this.dialogFullScreen = false; // 弹出框全屏
|
||||
this.cardRowColNum = 2; // 主信息一行显示几列
|
||||
this.countForValidJoinForm = 0; // 已成功校验的关联表单个数
|
||||
this.$emit("closeEvent", val);
|
||||
},
|
||||
handleTopCloseDialog() {
|
||||
// 为主表的编辑表单,渲染上默认值
|
||||
this.initDefaultSaveForm();
|
||||
this.showDialog = false; // 编辑详情弹框是否显示
|
||||
this.dialogFullScreen = false; // 弹出框全屏
|
||||
this.cardRowColNum = 2; // 主信息一行显示几列
|
||||
this.countForValidJoinForm = 0; // 已成功校验的关联表单个数
|
||||
},
|
||||
// 设置一行显示几列
|
||||
handleSetRowColNum(num) {
|
||||
this.cardRowColNum = num;
|
||||
},
|
||||
// 根据关联类型计算组件
|
||||
getComponentByJoinType(type, item) {
|
||||
if (type == "OneToOne") {
|
||||
return "EditForm";
|
||||
} else if (type == "OneToMany") {
|
||||
return "EditTable";
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
async queryByPrimarykey(rowData) {
|
||||
const { data, code } = await this.option.buttons.queryByPrimarykey.api(
|
||||
rowData
|
||||
);
|
||||
if (code != "200") return;
|
||||
this.showDialog = true;
|
||||
this.saveForm = this.handleDetailData(data);
|
||||
},
|
||||
// 保存前,先调用校验
|
||||
handleValidateAndSave() {
|
||||
this.countForValidJoinForm = 0;
|
||||
// 主表单校验
|
||||
this.$refs.mainForm.validate(mainValid => {
|
||||
if (mainValid == false) {
|
||||
console.warn("主表单校验失败");
|
||||
return;
|
||||
}
|
||||
console.log("主表单校验完成");
|
||||
if (this.joinEntitys == null || this.joinEntitys.length == 0) {
|
||||
// 如果子表没有信息,直接提交
|
||||
this.handleSave();
|
||||
return;
|
||||
}
|
||||
for (let i = 0; i < this.joinEntitys.length; i++) {
|
||||
console.log(`开始校验子表单-${i} 校验`);
|
||||
let item = this.joinEntitys[i];
|
||||
console.log(item);
|
||||
if (
|
||||
this.$refs["joinForm" + i] == null ||
|
||||
item.hide == true ||
|
||||
this.saveForm[item.fieldNameInMainEntityOnSave] == null ||
|
||||
this.saveForm[item.fieldNameInMainEntityOnSave].length == 0
|
||||
) {
|
||||
console.warn("子表单校验失败");
|
||||
} else {
|
||||
const childrenChecked = this.checkedChildrenValidate(
|
||||
this.saveForm[item.fieldNameInMainEntityOnSave],
|
||||
item.columns
|
||||
);
|
||||
if (!childrenChecked) {
|
||||
return;
|
||||
}
|
||||
|
||||
// console.log('子表单没有数据,直接跳过')
|
||||
this.countForValidJoinForm++;
|
||||
console.log(
|
||||
"已经校验的子表单:" +
|
||||
this.countForValidJoinForm +
|
||||
" 共:" +
|
||||
this.joinEntitys.length
|
||||
);
|
||||
// 所有关联表单校验通过
|
||||
if (this.countForValidJoinForm == this.joinEntitys.length) {
|
||||
console.log("子表单校验完成,提交主表单");
|
||||
this.handleSave();
|
||||
}
|
||||
continue;
|
||||
}
|
||||
let joinForm = this.$refs["joinForm" + i];
|
||||
if (toString.call(joinForm) == "[object Array]") {
|
||||
joinForm = joinForm[0];
|
||||
}
|
||||
joinForm.validate(joinValid => {
|
||||
if (joinValid) {
|
||||
this.countForValidJoinForm++;
|
||||
console.log(
|
||||
"已经校验的子表单:" +
|
||||
this.countForValidJoinForm +
|
||||
" 共:" +
|
||||
this.joinEntitys.length
|
||||
);
|
||||
// 所有关联表单校验通过
|
||||
if (this.countForValidJoinForm == this.joinEntitys.length) {
|
||||
console.log("子表单校验完成,提交主表单");
|
||||
this.handleSave();
|
||||
}
|
||||
} else {
|
||||
console.warn(`子表单${i}校验失败:`);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
async handleSave() {
|
||||
const params = this.submitDetailData(this.saveForm, this.modelType);
|
||||
// 新增
|
||||
if (this.modelType == "add") {
|
||||
const { code, message } = await this.option.buttons.add.api(params);
|
||||
if (code == "200") {
|
||||
// 保存结束,关闭对话框
|
||||
this.handleCloseDialog();
|
||||
// 向外层发关闭事件
|
||||
// this.$emit('closeEvent')
|
||||
return;
|
||||
} else {
|
||||
// ;(this.countForValidJoinForm = 0), // 已成功校验的关联表单个数
|
||||
console.log(`提交表单调用新增接口失败:${message}`);
|
||||
}
|
||||
}
|
||||
// 修改
|
||||
if (this.modelType == "edit") {
|
||||
const { code, message } = await this.option.buttons.edit.api(params);
|
||||
if (code == "200") {
|
||||
// 保存结束,关闭对话框
|
||||
this.handleCloseDialog();
|
||||
// 向外层发关闭事件
|
||||
// this.$emit('closeEvent')
|
||||
return;
|
||||
} else {
|
||||
// ;(this.countForValidJoinForm = 0), // 已成功校验的关联表单个数
|
||||
console.log(`提交表单调用更新接口失败:${message}`);
|
||||
}
|
||||
}
|
||||
},
|
||||
// 子表单数据校验
|
||||
checkedChildrenValidate(list, confingList) {
|
||||
const configFileds = confingList.map(item => item.field);
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
const item = list[i];
|
||||
for (let key = 0; key < configFileds.length; key++) {
|
||||
if (
|
||||
item.hasOwnProperty(configFileds[key]) &&
|
||||
!item[configFileds[key]]
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.notfull-screen {
|
||||
/deep/.el-dialog__body {
|
||||
background-color: rgb(240, 242, 245);
|
||||
padding: 5px;
|
||||
max-height: 60vh;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
.full-screen {
|
||||
/deep/.el-dialog__body {
|
||||
background-color: rgb(240, 242, 245);
|
||||
padding: 5px;
|
||||
height: calc(100vh - 110px);
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
151
src/components/AnjiPlus/anji-daterange.vue
Normal file
@@ -0,0 +1,151 @@
|
||||
<!--
|
||||
:v-model=""
|
||||
:format="'yyyy-MM-dd HH:mm:ss'" 绑定值的格式,一般是参数传到后台的数据格式
|
||||
:defaultValue="['00:00:00','23:59:59']" 选中日期后的默认具体时刻 数据格式为数组 ['00:00:00', '23:59:59']
|
||||
@change=""
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-date-picker
|
||||
v-model="selectedRangeValue"
|
||||
style="width: 100%"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:value-format="format"
|
||||
unlink-panels
|
||||
:picker-options="pickerOptions"
|
||||
:default-time="defaultValue"
|
||||
@change="valueChanged"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import miment from "miment";
|
||||
export default {
|
||||
props: {
|
||||
format: {
|
||||
type: String,
|
||||
default: "yyyy-MM-dd HH:mm:ss"
|
||||
},
|
||||
defaultValue: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectedRangeValue: [],
|
||||
pickerOptions: {
|
||||
shortcuts: [
|
||||
{
|
||||
text: "今天",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date(
|
||||
new Date(new Date().getTime()).setHours(0, 0, 0, 0)
|
||||
);
|
||||
picker.$emit("pick", [start, end]);
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "昨天",
|
||||
onClick(picker) {
|
||||
const start = new Date(
|
||||
new Date(new Date().getTime() - 24 * 60 * 60 * 1000).setHours(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
)
|
||||
);
|
||||
const end = new Date(
|
||||
new Date(new Date().getTime() - 24 * 60 * 60 * 1000).setHours(
|
||||
23,
|
||||
59,
|
||||
59,
|
||||
999
|
||||
)
|
||||
);
|
||||
picker.$emit("pick", [start, end]);
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "最近一周",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(
|
||||
miment()
|
||||
.add(-1, "ww")
|
||||
.stamp()
|
||||
);
|
||||
picker.$emit("pick", [start, end]);
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "最近一个月",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(
|
||||
miment()
|
||||
.add(-1, "MM")
|
||||
.stamp()
|
||||
);
|
||||
picker.$emit("pick", [start, end]);
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "最近三个月",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(
|
||||
miment()
|
||||
.add(-3, "MM")
|
||||
.stamp()
|
||||
);
|
||||
picker.$emit("pick", [start, end]);
|
||||
}
|
||||
}
|
||||
],
|
||||
onPick: ({ maxDate, minDate }) => {
|
||||
this.minDate = minDate;
|
||||
this.maxDate = maxDate;
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
value(val) {
|
||||
this.parseDefaultVal(val);
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
// el-date-range的值默认是数组,gaea需要的是'start,end'字符串,这里做下转换
|
||||
parseDefaultVal(val) {
|
||||
if (val != null) {
|
||||
this.selectedRangeValue = val.split(",");
|
||||
} else {
|
||||
this.selectedRangeValue = [];
|
||||
}
|
||||
},
|
||||
valueChanged(val) {
|
||||
if (val != null) {
|
||||
let rangeVal = val.toString();
|
||||
this.$emit("change", rangeVal);
|
||||
this.$emit("input", rangeVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
209
src/components/AnjiPlus/anji-dialog.vue
Normal file
@@ -0,0 +1,209 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:width="dialogWidth"
|
||||
:class="dialogFullScreen ? 'full-screen' : 'notfull-screen'"
|
||||
center
|
||||
:fullscreen="dialogFullScreen"
|
||||
:visible.sync="dialogConfig.dialogVisible"
|
||||
:before-close="handleDialogClose"
|
||||
append-to-body
|
||||
modal-append-to-body
|
||||
>
|
||||
<template v-slot:title>
|
||||
{{ getDialogTitle(dialogConfig.dialogType) }}
|
||||
<button
|
||||
v-if="dialogConfig.isFullScreen"
|
||||
type="button"
|
||||
aria-label="Close"
|
||||
class="el-dialog__headerbtn"
|
||||
style="right: 50px"
|
||||
@click="dialogFullScreen = !dialogFullScreen"
|
||||
>
|
||||
<i class="el-dialog__close el-icon el-icon-full-screen" />
|
||||
</button>
|
||||
</template>
|
||||
<div class="card-body">
|
||||
<div class="anji-card">
|
||||
<div v-if="dialogConfig.isSetColRow" class="card-head">
|
||||
<div class="main-card-header-button">
|
||||
<el-button type="text" @click="handleSetRowColNum(4)"
|
||||
>||||</el-button
|
||||
>
|
||||
<el-button type="text" @click="handleSetRowColNum(3)"
|
||||
>|||</el-button
|
||||
>
|
||||
<el-button type="text" @click="handleSetRowColNum(2)">||</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<slot name="dialogCont" />
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
<div slot="footer" class="anji-button">
|
||||
<el-button
|
||||
v-if="isBtnClose"
|
||||
type="danger"
|
||||
plain
|
||||
@click="handleDialogClose"
|
||||
>{{ dialogConfig.isBtnClose.text || "关闭" }}</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="isBtnSave"
|
||||
type="primary"
|
||||
plain
|
||||
@click="handleDialogSave"
|
||||
>{{ dialogConfig.isBtnSave.text || "保存" }}</el-button
|
||||
>
|
||||
<slot name="dialogBtn" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
// 弹框配置文件
|
||||
dialogConfig: {
|
||||
required: true,
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
dialogType: "add",
|
||||
dialogWidth: "60%",
|
||||
isFullScreen: true,
|
||||
isSetColRow: true,
|
||||
isBtnClose: {
|
||||
value: true,
|
||||
text: "关闭"
|
||||
},
|
||||
isBtnSave: {
|
||||
value: true,
|
||||
text: "保存"
|
||||
},
|
||||
column: 2,
|
||||
setColumnFn: () => {}
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogFullScreen: false // 弹出框全屏
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dialogWidth() {
|
||||
if (this.dialogConfig.dialogWidth) {
|
||||
return this.dialogConfig.dialogWidth;
|
||||
} else {
|
||||
if (this.dialogConfig.column == 2) {
|
||||
return "60%";
|
||||
}
|
||||
if (this.dialogConfig.column == 3) {
|
||||
return "70%";
|
||||
}
|
||||
if (this.dialogConfig.column == 4) {
|
||||
return "80%";
|
||||
}
|
||||
}
|
||||
return "60%";
|
||||
},
|
||||
isBtnClose() {
|
||||
return this.dialogConfig.isBtnClose || this.dialogConfig.isBtnClose.value;
|
||||
},
|
||||
isBtnSave() {
|
||||
return this.dialogConfig.isBtnSave || this.dialogConfig.isBtnSave.value;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDialogTitle(type) {
|
||||
let title = "新增";
|
||||
switch (type) {
|
||||
case "add":
|
||||
title = "新增";
|
||||
break;
|
||||
case "edit":
|
||||
title = "编辑";
|
||||
break;
|
||||
case "view":
|
||||
title = "查看";
|
||||
break;
|
||||
default:
|
||||
title = type;
|
||||
break;
|
||||
}
|
||||
return title;
|
||||
},
|
||||
handleSetRowColNum(val) {
|
||||
const cardRowColSpan = 24 / val;
|
||||
this.dialogConfig.setColumnFn(cardRowColSpan);
|
||||
},
|
||||
handleDialogClose() {
|
||||
this.$emit("handleClose");
|
||||
},
|
||||
handleDialogSave() {
|
||||
this.$emit("handleDialogSave");
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.notfull-screen {
|
||||
/deep/.el-dialog__body {
|
||||
background-color: rgb(240, 242, 245);
|
||||
padding: 5px;
|
||||
max-height: 60vh;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
.full-screen {
|
||||
/deep/.el-dialog__body {
|
||||
background-color: rgb(240, 242, 245);
|
||||
padding: 5px;
|
||||
height: calc(100vh - 110px);
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
.anji-card {
|
||||
margin-bottom: 5px;
|
||||
box-sizing: border-box;
|
||||
padding: 0 20px;
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
font-size: 14px;
|
||||
font-letiant: tabular-nums;
|
||||
line-height: 1.5;
|
||||
list-style: none;
|
||||
font-feature-settings: "tnum";
|
||||
position: relative;
|
||||
background: #fff;
|
||||
border-radius: 2px;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.drawerContainer {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.drawerMain {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
padding: 0 20px;
|
||||
}
|
||||
.footer {
|
||||
border-top: 1px solid #eff0f3;
|
||||
height: 66px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.addForm {
|
||||
text-align: center;
|
||||
}
|
||||
.activeColor /deep/.el-form-item__label {
|
||||
color: #5887fb;
|
||||
}
|
||||
</style>
|
||||
72
src/components/AnjiPlus/anji-fourLevel.vue
Normal file
@@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<el-cascader ref="country" v-model="countryValue" size="mini" :props="props" :options="countryOptions" style="width: 100%" clearable @change="handleChange" />
|
||||
</template>
|
||||
<script>
|
||||
import { postRequest } from '@/api/common.js'
|
||||
export default {
|
||||
props: {
|
||||
value: null,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
countryValue: [],
|
||||
props: {
|
||||
value: 'value',
|
||||
label: 'label',
|
||||
children: 'children',
|
||||
},
|
||||
countryOptions: [],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value(val) {
|
||||
this.handleCountryEcho(val)
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.provinceFn()
|
||||
this.handleCountryEcho(this.value)
|
||||
},
|
||||
methods: {
|
||||
// 获取省市区
|
||||
async provinceFn() {
|
||||
const { code, data } = await postRequest()
|
||||
if (code != 200) return
|
||||
this.countryOptions = data
|
||||
},
|
||||
handleChange(value) {
|
||||
if (value.length > 0) {
|
||||
const countryNameArr = this.$refs.country.getCheckedNodes()[0].pathLabels
|
||||
const countryObj = {
|
||||
countryName: countryNameArr[0],
|
||||
provinceName: countryNameArr[1],
|
||||
cityName: countryNameArr[2],
|
||||
areaName: countryNameArr[3],
|
||||
countryCode: value[0],
|
||||
provinceCode: value[1],
|
||||
cityCode: value[2],
|
||||
areaCode: value[3],
|
||||
}
|
||||
|
||||
this.$emit('input', countryObj)
|
||||
this.$emit('change', countryObj)
|
||||
} else {
|
||||
this.$emit('input', {})
|
||||
this.$emit('change', {})
|
||||
}
|
||||
},
|
||||
handleCountryEcho(val) {
|
||||
if (val) {
|
||||
this.countryValue = [val.countryCode, val.provinceCode, val.cityCode, val.areaCode || val.regionCode]
|
||||
} else {
|
||||
this.countryValue = []
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.con {
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||