xy 2 years ago
parent 89df343373
commit 6a2405ebf4

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 KiB

@ -9,7 +9,11 @@ export default {
delayReq: {
type: Boolean,
default: false
},//是否延时请求
},//created获取数据时,是否等select条件传入后再请求
isFirstReq: {
type: Boolean,
default: true
},//created时是否请求
reqOpt: Object, //请求参数配置
destroyReqOpt:Object,
resProp: {
@ -204,13 +208,6 @@ export default {
},
methods: {
//方法
calculateTextWidth(text) {
const canvas = document.createElement('canvas');
const context = canvas.getContext('2d');
context.font = '14px Arial'; // Set the font size and family to match the table cell's font
const metrics = context.measureText(text);
return metrics.width;
},
initLoad() {
if (this.height) return;
let clientHeight = document.documentElement.clientHeight;
@ -777,18 +774,20 @@ export default {
},
},
created() {
if(this.delayReq) {
let watch = this.$watch(()=>this.reqOpt,async (newVal,oldVal)=>{
if(this.action) {
await this.getTableData();
watch();
}
},{
deep: true,
immediate: true
})
} else {
if(this.action) this.getTableData();
if (this.isFirstReq) {
if(this.delayReq) {
let watch = this.$watch(()=>this.reqOpt,async (newVal,oldVal)=>{
if(this.action) {
await this.getTableData();
watch();
}
},{
deep: true,
immediate: true
})
} else {
if(this.action) this.getTableData();
}
}
},
mounted() {
@ -903,68 +902,68 @@ export default {
scopedSlots={
item.customFn || item.type === "expand"
? {
default(scope) {
if (item.type === "expand") {
return item.expandFn(scope);
}
if (item.customFn) {
return item.customFn(scope.row, scope);
}
},
}
default(scope) {
if (item.type === "expand") {
return item.expandFn(scope);
}
if (item.customFn) {
return item.customFn(scope.row, scope);
}
},
}
: ""
}
>
{item.multiHd
? item.multiHd.map((item1, index1) => {
return (
<af-table-column
//key={`xy-table-col-multi-${item1.prop}`}
key={String(Math.random()) + index1}
prop={`${item.pProp ? item.pProp + "." : ""}${
item1.prop
}`}
type={item1.type}
index={item1.index}
column-key={String(Math.random() + index1)}
label={item1.label}
prop={item1.prop}
width={item1.width ?? "auto"}
min-width={item1.minWidth}
fixed={item1.fixed}
render-header={item1.renderHeader}
sortable={item1.sortable ?? false}
sort-method={item1.sortMethod}
sort-by={item1.sortBy}
sort-orders={item1.sortOrders}
resizale={item1.resizale ?? false}
formatter={item1.formatter}
show-overflow-tooltip={
item1.showOverflowTooltip ?? true
}
align={item1.align ?? "center"}
header-align={item1.headerAlign ?? "center"}
class-name={`xy-table__row-fade ${item1.className}`}
label-class-name={`xy-table__title-fade ${item1.labelClassName}`}
selectable={item1.selectable}
reserve-selection={item1.reserveSelection}
filters={item1.filters}
filter-placement={item1.filterPlacement}
filter-multiple={item1.filterMultiple}
filter-method={item1.filterMethod}
filtered-value={item1.filteredValue}
scopedSlots={
item1.customFn
? {
default(scope1) {
return item1.customFn(scope1);
},
}
: ""
}
></af-table-column>
);
})
return (
<af-table-column
//key={`xy-table-col-multi-${item1.prop}`}
key={String(Math.random()) + index1}
prop={`${item.pProp ? item.pProp + "." : ""}${
item1.prop
}`}
type={item1.type}
index={item1.index}
column-key={String(Math.random() + index1)}
label={item1.label}
prop={item1.prop}
width={item1.width ?? "auto"}
min-width={item1.minWidth}
fixed={item1.fixed}
render-header={item1.renderHeader}
sortable={item1.sortable ?? false}
sort-method={item1.sortMethod}
sort-by={item1.sortBy}
sort-orders={item1.sortOrders}
resizale={item1.resizale ?? false}
formatter={item1.formatter}
show-overflow-tooltip={
item1.showOverflowTooltip ?? true
}
align={item1.align ?? "center"}
header-align={item1.headerAlign ?? "center"}
class-name={`xy-table__row-fade ${item1.className}`}
label-class-name={`xy-table__title-fade ${item1.labelClassName}`}
selectable={item1.selectable}
reserve-selection={item1.reserveSelection}
filters={item1.filters}
filter-placement={item1.filterPlacement}
filter-multiple={item1.filterMultiple}
filter-method={item1.filterMethod}
filtered-value={item1.filteredValue}
scopedSlots={
item1.customFn
? {
default(scope1) {
return item1.customFn(scope1);
},
}
: ""
}
></af-table-column>
);
})
: ""}
</af-table-column>
);
@ -1089,7 +1088,7 @@ export default {
clip-path: polygon(0 30%, 100% 30%, 100% 100%, 0 100%);
background: rgba(140, 140, 140, 0.7);
transform: scale(0.8, 0.8) translateX(-22px) translateY(-10px)
rotate(-90deg);
rotate(-90deg);
}
}
}

@ -0,0 +1,10 @@
const validation = new Map([
['integer',/^-?\d+$/],//整数
['date',/(^\d{10})|(^\d{13})|(^((\d\d\d\d(.+)|\d\d(.+))?(0?[1-9](.+)|1[012](.+))?((0?[1-9]|[12]\d|3[01])(.+))?\s?)((0?[0-9]|1[0-9]|2[0-3])(.+))?((0?[0-9]|[1-5][0-9])(.+))?((0?[0-9]|[1-5][0-9])(.+))?)$/],
['email',/^[^\s@]+@[^\s@]+\.[^\s@]+$/],
['idcard',/(^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3})|(^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx])$/],
['mobile',/(^1[3456789]\d{9})|(^(0\d{2,3}(-)*)?\d{7})$/],
['numeric',/^-?\d+(.\d+)?$/],
])
export default validation

@ -0,0 +1 @@
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11104" width="200" height="200"><path d="M891.428913 921.583884V476.766761L554.245407 271.954674V0L132.816386 256.141014v665.463015H90.512325v102.395971h842.958766v-102.395971z m-505.77526-51.067044h-84.285804V768.120869h84.285804z m0-204.791942h-84.285804v-102.395971h84.285804z m0-204.791942h-84.285804V358.577274h84.285804z m337.183507 409.604029H638.450632V768.120869h84.285804z m0-204.791943H638.450632v-102.395971h84.285804z" p-id="11105"></path></svg>

After

Width:  |  Height:  |  Size: 543 B

@ -0,0 +1 @@
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="12142" width="200" height="200"><path d="M522.24 104.448q2.048 0 5.12-2.048 6.144-4.096 16.384-14.336 12.288-11.264 24.576-16.384t32.768 3.072q10.24 3.072 16.384 8.704t11.776 10.752 12.288 8.704 16.896 3.584 17.408-3.072 13.824-5.632 13.312-3.584 15.872 2.048q10.24 4.096 13.824 11.776t2.048 15.872-7.168 16.384-13.824 13.312q-19.456 12.288-29.696 25.088t-20.48 27.136q-5.12 7.168-11.264 16.384t-11.264 18.432q-6.144 11.264-13.312 21.504l-211.968 0q-7.168-12.288-14.336-23.552-6.144-10.24-13.312-20.48t-12.288-18.432q-10.24-15.36-23.04-27.136t-25.088-20.992q-13.312-9.216-18.432-25.088t9.216-27.136q7.168-5.12 16.384-4.096t19.456 4.096 19.968 6.144 17.92 1.024q14.336-3.072 21.504-10.752t24.576-18.944q13.312-8.192 29.696-5.632t24.576 10.752q4.096 5.12 8.704 8.704t9.728 6.656q5.12 4.096 11.264 7.168zM637.952 309.248q12.288 16.384 30.72 35.84 15.36 17.408 37.888 39.424t52.224 46.592q24.576 21.504 50.688 50.688t45.568 68.096 27.136 89.6-2.56 113.152q-9.216 51.2-36.352 96.768t-72.192 79.36-107.008 53.76-140.8 19.968q-80.896 0-143.36-23.04t-105.984-59.904-69.12-82.432-33.792-90.624q-9.216-50.176-2.56-96.256t24.064-86.528 43.52-74.24 56.832-60.416q26.624-23.552 48.128-44.544t35.84-38.4q17.408-19.456 30.72-36.864l230.4 0zM529.408 623.616l-27.648-27.648-21.504-21.504q-10.24-10.24-14.336-15.36-8.192-7.168-21.504-11.776t-22.528 5.632q-8.192 11.264-4.096 22.016t9.216 16.896l15.36 14.336q11.264 12.288 24.576 26.624 15.36 16.384 33.792 34.816l-1.024 21.504-69.632 0q-9.216 0-15.872 7.168t-6.656 15.36 6.144 14.336 16.384 6.144l69.632 0 0 35.84-69.632 0q-9.216 0-15.872 5.632t-6.656 14.848q-1.024 8.192 5.632 13.824t16.896 5.632l69.632 0 0 20.48q1.024 14.336 9.216 19.968t20.48 5.632q12.288 1.024 19.968-7.68t7.68-17.92l0-20.48 71.68 0q10.24 0 16.896-4.608t5.632-14.848q0-21.504-28.672-21.504l-65.536 0 1.024-34.816 66.56-1.024q14.336 1.024 20.48-5.632t6.144-15.872q0-8.192-6.656-14.848t-20.992-6.656l-66.56 0 0-19.456q17.408-16.384 31.744-31.744 12.288-12.288 24.576-25.088t18.432-17.92q23.552-20.48 10.24-35.84-7.168-9.216-18.432-9.216t-20.48 8.192q-5.12 4.096-17.408 14.848t-24.576 22.016q-14.336 13.312-31.744 29.696z" p-id="12143"></path></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

@ -0,0 +1 @@
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14032" width="200" height="200"><path d="M906.752 230.912A212.992 212.992 0 0 1 862.208 460.8a200.704 200.704 0 0 1-245.248 33.28L563.2 555.52l40.448 41.472 24.064-24.576a31.744 31.744 0 0 1 44.544 0l195.072 201.728a32.768 32.768 0 0 1 0 45.568l-89.088 91.136a31.744 31.744 0 0 1-44.544 0l-195.584-201.728a32.768 32.768 0 0 1 0-45.568l22.016-22.528-38.4-39.424-272.384 301.568a61.952 61.952 0 0 1-89.6 0l-22.016-22.528a65.536 65.536 0 0 1 0-91.136l307.2-263.168-204.8-209.408H176.64L102.4 194.048l59.392-61.952 122.88 77.312v64.512l204.8 211.968 59.904-51.2a211.968 211.968 0 0 1 19.968-271.36 201.728 201.728 0 0 1 222.208-45.568l-129.024 133.12 111.104 113.664zM211.456 821.76a30.72 30.72 0 0 0-44.544 0 32.768 32.768 0 0 0 0 45.568 31.744 31.744 0 1 0 44.544-45.568z" fill="" p-id="14033" class="custom-cursor-on-hover"></path></svg>

After

Width:  |  Height:  |  Size: 921 B

@ -71,3 +71,21 @@
}
.el-dialog {
background-color: #fff;
border: 0;
border-radius: 6px;
background-clip: padding-box;
box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
&__header {
border-bottom: 1px solid #e8eaec;
padding: 14px 16px;
line-height: 1;
}
&__footer {
border-top: 1px solid #e8eaec;
padding: 12px 18px;
text-align: right;
}
}

@ -70,7 +70,7 @@ export default {
},
{
label: '租赁面积',
prop: 'zupingmianji'
prop: 'zulinmianji'
},
{
label: '租赁期限起止',

@ -1,10 +1,15 @@
<script>
import linkPickModal from "./linkPickModal.vue";
import { save, show, index, destroy } from "@/api/system/baseForm";
import { getparameter } from "@/api/system/dictionary";
import { domMap } from "@/const/inputType";
import { addPropsMap } from "@/const/addProps";
import { deepCopy } from "@/utils";
import validation from '@/const/validation';
export default {
components: {
linkPickModal,
},
props: {
formInfo: {
type: Array,
@ -13,217 +18,280 @@ export default {
tableName: String,
},
render(h) {
return h(
"el-dialog",
{
props: {
top: "8vh",
title: "新增",
visible: this.dialogVisible,
width: "750px",
},
on: {
"update:visible": (val) => {
this.dialogVisible = val;
return h("div", [
h(
"el-dialog",
{
props: {
title: "新增",
visible: this.dialogVisible,
width: "600px",
},
},
},
[
h(
"el-scrollbar",
{
style: {
height: "58vh",
on: {
"update:visible": (val) => {
this.dialogVisible = val;
},
},
[
h(
"el-form",
{
class: "form-body",
ref: "elForm",
style: {
"padding-right": "12px",
},
props: {
model: this.form,
labelWidth: "80px",
rules: this.rules,
labelPosition: "right",
size: "small",
},
},
(() => {
let dom = [];
this.formInfo
.filter((i) => i.form_show)
.forEach((i, index) => {
dom.push(
h(
"el-form-item",
{
ref: `elFormItem${i.field}`,
style: {
width: "100%",
},
props: {
label: i.name,
prop: i.field,
required:
i.validation instanceof Array
? !!i.validation.find((i) => i === "required")
: false,
},
},
this.$scopedSlots[i.field]
? this.$scopedSlots[i.field]({
fieldInfo: i,
form: this.form,
file: this.file,
})
: [
h(
domMap.get(i._params ? 'radio' : i.edit_input),
{
ref: `elEdit_${i.field}`,
style: {
width: "100%",
},
props: {
...addPropsMap.get(i._params ? 'radio' : i.edit_input),
...this.extraProps(i),
placeholder: i.help,
value: this.form[i.field],
},
attrs: {
placeholder: i.help || `请填写${i.name}`,
},
on: {
[this.getEventType(i.edit_input)]: (
e
) => {
if (i.field) {
this.form[i.field] = e;
this.form = Object.assign(
{},
this.form
);
}
},
},
scopedSlots:
i.edit_input === "file" ||
i.edit_input === "files"
? {
file: (scope) => {
let { file } = scope;
return [
h("div", {}, [
h("i", {
class: {
"el-icon-circle-check":
file.status ===
"success",
"el-icon-loading":
file.status ===
"uploading",
},
style: {
color:
file.status ===
"success"
? "green"
: "",
},
}),
h(
"a",
{
attrs: {
href: file.url,
download: file.name,
},
class: {
"uploaded-a":
file.status ===
"success",
},
style: {
padding: "0 4px",
},
},
file.name
),
]),
h("i", {
class: "el-icon-close",
on: {
["click"]: () =>
this.fileRemoveHandler(
file,
i.field
),
},
}),
];
},
}
: "",
},
this.optionsRender(h, i)
),
]
)
);
});
return dom;
})()
),
]
),
h("template", { slot: "footer" }, [
},
[
h(
"el-button",
"el-scrollbar",
{
props: {
size: "mini"
},
on: {
click: () => (this.dialogVisible = false),
style: {
height: "58vh",
},
},
"取 消"
[
h(
"el-form",
{
ref: "elForm",
class: "form-body",
props: {
model: this.form,
labelWidth: "80px",
rules: this.rules,
labelPosition: "right",
size: "small",
},
},
(() => {
let dom = [];
this.formInfo
.filter((i) => i.form_show)
.forEach((i, index) => {
dom.push(
h(
"el-form-item",
{
ref: `elFormItem${i.field}`,
style: {
width: "100%",
},
props: {
label: i.name,
prop: i.field,
required:
i.validation instanceof Array
? !!i.validation.find((i) => i === "required")
: false,
},
},
this.$scopedSlots[i.field]
? this.$scopedSlots[i.field]({
fieldInfo: i,
form: this.form,
file: this.file,
})
: i._relations &&
i.edit_input !== "file" &&
i.edit_input !== "files"
? [
h(
"el-input",
{
props: {
readonly: true,
value:
(this.pickModalText[i.field]) || (i._relations.link_relation ===
"newHasOne" ||
i._relations.link_relation === "hasOne"
? this.originalForm[
i._relations.link_with_name
]?.name ||
this.originalForm[
i._relations.link_with_name
]?.mingcheng ||
this.originalForm[
i._relations.link_with_name
]?.no ||
this.originalForm[
i._relations.link_with_name
]?.id || this.form[i.field]
: this.originalForm[
i._relations.link_with_name
]
?.map(
(j) =>
j[
i._relations
.custom_form_field
]
)
?.toString()),
},
on: {
['focus']:e => {
this.pickedLinkField.field = i.field;
this.pickedLinkField.linkType =
i._relations.link_relation;
this.pickedLinkField.linkTableName =
i._relations.link_table_name;
this.pickedLinkField.originalRows =
this.originalForm[
i._relations.link_with_name
];
this.$refs["linkPickModal"].show();
}
},
}
),
]
: [
h(
domMap.get(i.edit_input),
{
ref: `elEdit_${i.field}`,
style: {
width: "100%",
},
props: {
...addPropsMap.get(i.edit_input),
...this.extraProps(i),
placeholder: i.help,
value: this.form[i.field],
},
attrs: {
placeholder: i.help || `请填写${i.name}`,
},
on: {
[this.getEventType(i.edit_input)]: (
e
) => {
if (i.field) {
this.form[i.field] = e;
this.form = Object.assign(
{},
this.form
);
}
},
},
scopedSlots:
i.edit_input === "file" ||
i.edit_input === "files"
? {
file: (scope) => {
let { file } = scope;
return [
h("div", {}, [
h("i", {
class: {
"el-icon-circle-check":
file.status ===
"success",
"el-icon-loading":
file.status ===
"uploading",
},
style: {
color:
file.status ===
"success"
? "green"
: "",
},
}),
h(
"a",
{
attrs: {
href: file.url,
download: file.name,
},
class: {
"uploaded-a":
file.status ===
"success",
},
style: {
padding: "0 4px",
},
},
file.name
),
]),
h("i", {
class: "el-icon-close",
on: {
["click"]: () =>
this.fileRemoveHandler(
file,
i.field
),
},
}),
];
},
}
: "",
},
this.optionsRender(h, i)
),
]
)
);
});
return dom;
})()
),
]
),
h(
"el-button",
{
props: {
type: "warning",
plain: true,
size: 'mini'
},
on: {
click: () => this.init(),
h("template", { slot: "footer" }, [
h(
"el-button",
{
on: {
click: () => (this.dialogVisible = false),
},
},
},
"重 置"
),
h(
"el-button",
{
props: {
type: "primary",
size: 'mini'
"取 消"
),
h(
"el-button",
{
props: {
type: "warning",
plain: true,
},
on: {
click: () => this.init(),
},
},
on: {
click: this.submit,
"重 置"
),
h(
"el-button",
{
props: {
type: "primary",
},
on: {
click: this.submit,
},
},
},
"确 定"
),
]),
]
);
"确 定"
),
]),
]
),
h("linkPickModal", {
ref: "linkPickModal",
props: {
linkType: this.pickedLinkField.linkType,
linkTableName: this.pickedLinkField.linkTableName,
field: this.pickedLinkField.field,
originalRows: this.pickedLinkField.originalRows,
},
on: {
["confirm"]: ({ field, value, text }) => {
this.form[field] = value;
this.pickModalText[field] = text;
},
},
}),
]);
},
data() {
return {
@ -234,6 +302,14 @@ export default {
originalForm: {},
rules: {},
file: {},
pickedLinkField: {
linkType: "",
linkTableName: "",
field: "",
originalRows: [],
},
pickModalText: {}
};
},
methods: {
@ -251,20 +327,16 @@ export default {
//渲染一些组件内部需要选项等
optionsRender(h, info) {
if (info.edit_input === "checkbox" || info.edit_input === "radio" || info._params) {
if (info.edit_input === "checkbox" || info.edit_input === "radio") {
return info._params && info._params instanceof Array
? info._params.map((i) =>
h("el-option", {
props: {
label:
i.name ||
i.mingcheng ||
i.label ||
i.key ||
i.value ||
i.id ||
i.no,
value: i.id || i.value,
i.key || i.value || i.name || i.no || i.mingcheng || i.id,
value: info._relations
? i[info._relations.foreign_key]
: i.value,
},
})
)
@ -381,6 +453,7 @@ export default {
async getDetail() {
const res = await show({ id: this.id, table_name: this.tableName });
this.$integrateData(this.form, res);
this.form = Object.assign({}, this.form);
this.formInfo.forEach((i) => {
if (i && (i.edit_input === "file" || i.edit_input === "files")) {
@ -389,24 +462,28 @@ export default {
res[i._relations.link_with_name] instanceof Array
? res[i._relations.link_with_name].map((i) => {
return {
name: i?.original_name || i?.name,
name: i?.original_name,
url: i?.url,
response: i,
};
})
: [
{
name: res[i._relations.link_with_name]?.original_name || res[i._relations.link_with_name]?.name,
name: res[i._relations.link_with_name]?.original_name,
url: res[i._relations.link_with_name]?.url,
response: res[i._relations.link_with_name],
},
])
: (this.file[i.field] = []);
}
this.form = Object.assign({}, this.form);
this.originalForm = deepCopy(res);
return
}
if (i && (i._relations?.link_relation === 'newHasMany' || i._relations?.link_relation === 'hasMany')) {
this.form[i.field] = res[i._relations.link_with_name].map(j => j[i._relations.custom_form_field])
}
});
this.originalForm = deepCopy(res);
},
submit() {
@ -444,9 +521,9 @@ export default {
}
}
if (copyForm[info._relations?.link_with_name]?.length > 0) {
delete copyForm[info.field];
}
// if (copyForm[info._relations?.link_with_name]?.length > 0) {
// delete copyForm[info.field];
// }
if (
info._relations?.link_relation === "newHasMany" ||
info._relations?.link_relation === "hasMany"
@ -455,37 +532,22 @@ export default {
copyForm[info._relations.link_with_name] = this.file[
info.field
]?.map((i) => {
let copyRelation = i?.response ? deepCopy(i?.response) : "";
console.log(333,copyRelation)
//TODO: 待修改
if (/:\/\/:\/\//g.test(copyRelation?.url)) {
copyRelation.url.replace(/:\/\/:\/\//g,'://')
}
delete copyRelation.id;
return {
upload_id: i?.response?.id,
...copyRelation,
...i?.response
};
});
} else {
copyForm[info._relations.link_with_name] = copyForm[
info.field
] instanceof Array ? copyForm[
info.field
]?.map((i) => {
let copyRelation = info._params.find(
(param) => param[info._relations?.foreign_key] === i
)
? deepCopy(
info._params.find(
(param) => param[info._relations?.foreign_key] === i
)
)
: "";
delete copyRelation.id;
return {
[info._relations.foreign_key]: i,
...copyRelation,
[info._relations.custom_form_field]: i,
//...copyRelation,
};
});
}) : '';
}
delete copyForm[info.field];
@ -495,33 +557,28 @@ export default {
info._relations?.link_relation === "hasOne"
) {
if (info.edit_input === "file") {
copyForm[info._relations.link_with_name] = [
{
upload_id: this.file[info.field]?.response?.id,
...this.file[info.field],
},
];
copyForm[info.field] = this.file[info.field] ? this.file[info.field][0]?.response?.id : '';
} else {
let copyRelation = deepCopy(
info._params.find(
(param) => param.id == this.form[info.field]
)
);
if (copyRelation) {
delete copyRelation.id;
copyForm[info._relations.link_with_name] = [
{
id: this.form[info._relations?.link_with_name]?.id,
[info.field === "shenhebumen"
? "dept_id"
: info._relations.foreign_key]: this.form[info.field],
...copyRelation,
},
];
}
// let copyRelation = deepCopy(
// info._params.find(
// (param) => param.id == this.form[info.field]
// )
// );
// if (copyRelation) {
// delete copyRelation.id;
// copyForm[info._relations.link_with_name] = [
// {
// id: this.form[info._relations?.link_with_name]?.id,
// [info.field === "shenhebumen"
// ? "dept_id"
// : info._relations.foreign_key]: this.form[info.field],
// ...copyRelation,
// },
// ];
// }
}
delete copyForm[info.field];
//delete copyForm[info.field];
}
if (!copyForm[info._relations?.link_with_name]) {
delete copyForm[info._relations?.link_with_name];
@ -538,6 +595,7 @@ export default {
// }
// }
});
promiseAll.push(
save(Object.assign(copyForm, { table_name: this.tableName }))
);
@ -564,12 +622,29 @@ export default {
this.form[i.field] = "";
if (
i.validation instanceof Array &&
i.validation.length > 0 &&
!!i.validation.find((i) => i === "required")
i.validation.length > 0
) {
this.rules[i.field] = [
{ required: true, message: `请填写${i.name}` },
];
this.rules[i.field] = []
i.validation.forEach((j) => {
if (j === "required") {
this.rules[i.field].push({ required: true, message: `请填写${i.name}` })
} else {
this.rules[i.field].push({
validator: (rule, value, callback) => {
if (value === '') {
callback()
return
}
if (validation.get(j).test(value)) {
callback()
} else {
callback(new Error(`${i.name}验证不通过`))
}
},
trigger: 'blur'
})
}
})
}
if (i.edit_input === "files") {
this.form[i.field] = [];
@ -580,14 +655,12 @@ export default {
if (i.edit_input === "checkbox") {
this.form[i.field] = [];
}
if (i._relations) {
this.form[i._relations?.link_with_name] = [];
}
}
});
document.documentElement.style.setProperty('--column-num', Math.floor(newVal.length / 8).toString())
document.documentElement.style.setProperty(
"--column-num",
newVal.length > 8 ? "2" : "1"
);
},
//immediate: true,
},
@ -597,14 +670,13 @@ export default {
this.$nextTick(() => this.getDetail());
}
} else {
this.originalForm = {};
this.file = {};
this.id = "";
this.type = "";
this.init();
this.$refs["elForm"].clearValidate();
delete this.form.id;
for (let key in this.file) {
this.file[key] = [];
}
}
},
},
@ -625,7 +697,6 @@ export default {
color: red;
text-decoration: underline;
}
.form-body {
display: grid;
grid-gap: 10px;

@ -0,0 +1,323 @@
<template>
<div>
<el-dialog :visible.sync="dialogVisible">
<template>
<div class="select">
<Select
v-model="select.filter[0].key"
style="width: 100px"
placeholder="搜索条目"
>
<Option v-for="item in fields" :key="item.id" :value="item.field">{{
item.name
}}</Option>
</Select>
<Select
v-model="select.filter[0].op"
style="width: 100px; margin-left: 10px"
placeholder="搜索条件"
>
<Option v-for="item in op" :key="item.value" :value="item.value">{{
item.label
}}</Option>
</Select>
<template v-if="select.filter[0].op !== 'range'">
<Input
clearable
v-model="select.filter[0].value"
style="width: 150px; margin-left: 10px"
placeholder="请填写关键词"
/>
</template>
<template v-else>
<Input
:value="select.filter[0].value.split(',')[0]"
style="width: 150px; margin-left: 10px"
placeholder="范围开始关键词"
@input="(e) => inputStartHandler(e, select.filter[0])"
/>
<span style="margin-left: 10px; display: flex; align-items: center"
>至</span
>
<Input
:value="select.filter[0].value.split(',')[1]"
style="width: 150px; margin-left: 10px"
placeholder="范围结束关键词"
@input="(e) => inputEndHandler(e, select.filter[0])"
/>
</template>
<Button
style="margin-left: 10px"
type="primary"
@click="$refs['table'].getTableData(true)"
>查询</Button
>
</div>
<xy-table
:is-first-req="false"
ref="table"
:row-key="(row) => row.id"
:height="380"
:action="index"
:delay-req="true"
:req-opt="select"
:table-item="columns"
@row-click="rowPick"
@loaded="() => {
adjustAlignment();
selectRows();
}"
@select="selectBk"
></xy-table>
</template>
<template #footer>
<span>
<el-button size="mini" @click="dialogVisible = false"
>取 消</el-button
>
<el-button size="mini" type="primary" @click="confirm"
>确 定</el-button
>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import { op } from '@/const/op'
import { index } from "@/api/system/baseForm";
import { index as customFormIndex, show } from "@/api/system/customForm";
export default {
props: {
linkType: String,
linkTableName: String,
field: String,
originalRows: {
default: () => [],
type: [Array,Object],
},
},
data() {
return {
firstAdjustTable: true,
op,
tempRow: {},
dialogVisible: false,
select: {
table_name: "",
table_id: "",
filter: [
{
key: '',
op: '',
value: ''
}
]
},
fields: [],
columns: [],
originalRowIds: [],
};
},
methods: {
index,
show() {
this.dialogVisible = true;
},
hide() {
this.dialogVisible = false;
},
//target要为内存地址引用类型
inputStartHandler(e, target) {
let temp = target?.value.split(",")[1];
target.value = `${e},${temp ? temp : ""}`;
},
inputEndHandler(e, target) {
let temp = target?.value.split(",")[0];
target.value = `${temp ? temp : ""},${e}`;
},
async getDataTableName() {
if (this.linkType === "hasMany" || this.linkType === "newHasMany") {
const tables = (
await customFormIndex({
page: 1,
page_size: 999,
})
)?.data;
const id = tables?.find((i) => i.table_name === this.linkTableName)?.id;
const res = (
await show(
{
id,
},
false
)
)?.relation[0]?.link_table_name;
this.select.table_name = res;
this.select.table_id = tables.find(
(i) => i.table_name === this.select.table_name
)?.id;
}
if (this.linkType === "hasOne" || this.linkType === "newHasOne") {
const tables = (
await customFormIndex({
page: 1,
page_size: 999,
})
)?.data;
const table = tables?.find((i) => i.table_name === this.linkTableName);
this.select.table_name = table.table_name;
this.select.table_id = table.id;
}
},
async getColumns() {
const res = await show(
{
id: this.select.table_id,
},
false
);
console.log(res);
this.fields = res.fields;
this.columns = res.fields
?.filter((i) => i.list_show)
.map((i) => {
let linkOb = {};
if (
i.select_item &&
typeof i.select_item === "object" &&
!(i.select_item instanceof Array)
) {
let keys = Object.keys(i.select_item);
linkOb.customFn = (row) => {
let paramMap = new Map();
keys.forEach((key) => {
paramMap.set(i.select_item[key], key);
});
return <span>{paramMap.get(row[i.field]?.toString())}</span>;
};
}
return Object.assign(
{
prop: i.field,
label: i.name,
width: i.width,
fixed: i.is_fixed,
},
linkOb
);
});
this.columns.unshift({
type: "index",
width: 50,
});
if (this.linkType === "hasMany" || this.linkType === "newHasMany") {
this.columns.unshift({
type: "selection",
width: 50,
reserveSelection: true,
});
}
},
adjustAlignment () {
if (this.firstAdjustTable) {
const data = this.$refs['table'].getListData();
if (data.length === 0) return;
this.fields.forEach((i) => {
let lengthTemp = data[0][i.field]?.length??0;
for (let j = 0;j < data.length;j++) {
if (/^-?\d+\.\d+/.test(data[j][i.field])) {
this.columns.find(a => a.prop === i.field).align = 'right';
return
}
if (Math.abs(lengthTemp - (data[j][i.field]?.length)??0) > 4) {
this.columns.find(a => a.prop === i.field).align = 'left';
return
}
}
})
this.$nextTick(() => {
this.$refs['table'].doLayout();
this.firstAdjustTable = false;
})
}
},
selectRows() {
this.originalRowIds.forEach((id) => {
let data = this.$refs["table"].getListData();
let row = data.find((i) => i.id === id);
if (row) {
this.$refs["table"].toggleRowSelection(row);
}
});
},
rowPick({ row }) {
this.tempRow = row;
},
selectBk(selections, row) {
if (!selections.find((i) => i.id === row.id)) {
this.originalRowIds.splice(this.originalRowIds.indexOf(row.id), 1);
}
},
confirm() {
this.linkType === "hasMany" || this.linkType === "newHasMany"
? this.$emit("confirm", {
field: this.field,
value: Array.from(
new Set([
...this.$refs["table"].getSelection()?.map((i) => i.id),
...this.originalRowIds,
])
),
})
: this.$emit("confirm", {
field: this.field,
value: this.tempRow.id,
text: this.tempRow.name || this.tempRow.value || this.tempRow.mingcheng || this.tempRow.no || this.tempRow.id
});
this.dialogVisible = false;
},
},
computed: {},
watch: {
async linkTableName(newVal) {
await this.getDataTableName();
await this.getColumns();
await this.$refs["table"].getTableData();
},
dialogVisible(newVal) {
if (newVal) {
} else {
this.firstAdjustTable = true;
this.tempRow = {};
this.$refs["table"].clearSelection();
}
},
originalRows(newVal) {
this.originalRowIds = newVal.map((i) => i[this.field]);
this.selectRows();
},
},
};
</script>
<style scoped lang="scss">
.select {
margin-bottom: 10px;
}
</style>

@ -3,7 +3,7 @@
<el-card class="statics">
<div class="statics-item">
<p class="statics-item__title">面积总量</p>
<p class="statics-item__num">{{ listFilter.reduce((a,b) => a + Number(b.shijimianji),0) }} 平方</p>
<p class="statics-item__num">{{ areaTotal }} 平方</p>
</div>
<div class="statics-item">
<p class="statics-item__title">资产总量</p>
@ -11,11 +11,11 @@
</div>
<div class="statics-item">
<p class="statics-item__title">闲置面积</p>
<p class="statics-item__num">{{ Math.round(Math.random()*5000+5000) }} 平方</p>
<p class="statics-item__num">{{ idleArea }} 平方</p>
</div>
<div class="statics-item">
<p class="statics-item__title">租赁面积</p>
<p class="s tatics-item__num">{{ listFilter.reduce((a,b) => a + Number(b.shijimianji || 0),0) }} 平方</p>
<p class="statics-item__num">{{ leaseAreaTotal }} 平方</p>
</div>
<!-- <div class="statics-item">-->
<!-- <p class="statics-item__title">公益产业</p>-->
@ -827,6 +827,28 @@ export default {
zichanleixingTypes () {
return this.form.find(j => j.field === 'zichanleixing')?._params || []
},
areaTotal () {
return this.listFilter.reduce((a,b) => a + Number(b.shijimianji??0),0)
},
leaseAreaTotal () {
return this.listFilter.reduce((a,b) => {
if (b.id_leases_land_id_relation instanceof Array && b.id_leases_land_id_relation.length > 0 ) {
return a + Number(b.id_leases_land_id_relation.reduce((c,d) => {
if (this.$moment().isBetween(this.$moment(d.zulinkaishiqixian),this.$moment(d.zulinjieshuqixian))) {
return c + Number(d.zulinmianji)
} else {
return c
}
},0))
} else {
return a
}
},0)
},
idleArea () {
return this.areaTotal - this.leaseAreaTotal
}
},
created() {
this.getFormDetail();

@ -611,11 +611,11 @@ export default {
this.form.forEach((i) => {
let lengthTemp = data[0][i.field]?.length??0;
for (let j = 0;j < data.length;j++) {
if (/^-?\d+.\d+/.test(data[j][i.field])) {
if (/^-?\d+\.\d+/.test(data[j][i.field])) {
this.table.find(a => a.prop === i.field).align = 'right';
return
}
if (Math.abs(lengthTemp - data[j][i.field].length) > 4) {
if (Math.abs(lengthTemp - (data[j][i.field]?.length)??0) > 4) {
this.table.find(a => a.prop === i.field).align = 'left';
return
}

@ -53,7 +53,7 @@ export default {
hetongjiaozujieshushijian: "合同交租结束时间",
zulinkaishiqixian: "租赁开始期限",
zulinjieshuqixian: "租赁结束期限",
zupingmianji: "租赁面积",
zulingmianji: "租赁面积",
yingshouzujin: "应收租金"
}
}
@ -90,7 +90,7 @@ export default {
let splits = key.split('.');
let value = this.row;
for (let i = 0;i < splits.length;i++) {
value = value[splits[i]]
value = (splits[i] && value) ? value[splits[i]] : ""
}
return value;

@ -2,10 +2,43 @@
<div>
<Card style="margin: 20px 0;">
<div>
<div class="contract">
<div class="contract__title">
<h3>代办通知</h3>
<div class="more" @click="$router.push('/lease')">
更多
<i class="el-icon-d-arrow-right"></i>
</div>
</div>
<div class="type-bar">
<div class="type-bar__item" :class="{ 'type-bar__item--active': radio === 0 }" @click="radioPick(0)">合约中</div>
<div class="type-bar__item" :class="{ 'type-bar__item--active': radio === 1 }" @click="radioPick(1)">临期</div>
<div class="type-bar__item" :class="{ 'type-bar__item--active': radio === 2 }" @click="radioPick(2)">已过期</div>
<svg xmlns="http://www.w3.org/2000/svg" :style="{ 'left': 80 * radio + 'px' }" viewBox="0 0 100 10" preserveAspectRatio="xMinYMin meet">
<path d="M 0 10,L 44 10,L 50 2,L56 10,L 100 10" stroke="#aaa" stroke-width="1" fill="#fff"></path>
</svg>
</div>
<!-- <Tabs style="width: 24%;">-->
<!-- <TabPane label="合约中3"></TabPane>-->
<!-- <TabPane label="临期1"></TabPane>-->
<!-- <TabPane label="已过期2"></TabPane>-->
<!-- </Tabs>-->
<Table style="margin-top: 20px;" :loading="leaseTableLoading" size="small" stripe highlight-row :height="400" :data="leases" :columns="leaseTable"></Table>
<Page style="margin-top: 14px;display: flex;justify-content: flex-end;" size="small" :total="leaseTotal" show-elevator show-total :page-size="leaseSelect.page_size"></Page>
<!-- <xy-table :border="false" :is-page="false" :height="400" :table-item="table1" style="margin-top: 20px" size="mini" stripe ref="table1" :auths="[]" :action="index" :req-opt="select"></xy-table>-->
</div>
<Divider></Divider>
<el-row :gutter="80" type="flex">
<el-col :span="12">
<div class="contract__title">
<h3>通知</h3>
<h3>通知公告</h3>
<div class="more" @click="$router.push('/notice')">
更多
@ -47,37 +80,6 @@
</el-row>
</div>
<Divider></Divider>
<div class="contract">
<div class="contract__title">
<h3>租赁台账</h3>
<div class="more" @click="$router.push('/lease')">
更多
<i class="el-icon-d-arrow-right"></i>
</div>
</div>
<div class="type-bar">
<div class="type-bar__item" :class="{ 'type-bar__item--active': radio === 0 }" @click="radioPick(0)">合约中</div>
<div class="type-bar__item" :class="{ 'type-bar__item--active': radio === 1 }" @click="radioPick(1)">临期</div>
<div class="type-bar__item" :class="{ 'type-bar__item--active': radio === 2 }" @click="radioPick(2)">已过期</div>
<svg xmlns="http://www.w3.org/2000/svg" :style="{ 'left': 80 * radio + 'px' }" viewBox="0 0 100 10" preserveAspectRatio="xMinYMin meet">
<path d="M 0 10,L 44 10,L 50 2,L56 10,L 100 10" stroke="#aaa" stroke-width="1" fill="#fff"></path>
</svg>
</div>
<!-- <Tabs style="width: 24%;">-->
<!-- <TabPane label="合约中3"></TabPane>-->
<!-- <TabPane label="临期1"></TabPane>-->
<!-- <TabPane label="已过期2"></TabPane>-->
<!-- </Tabs>-->
<Table style="margin-top: 20px;" :loading="leaseTableLoading" size="small" stripe highlight-row :height="400" :data="leases" :columns="leaseTable"></Table>
<Page style="margin-top: 14px;display: flex;justify-content: flex-end;" size="small" :total="leaseTotal" show-elevator show-total :page-size="leaseSelect.page_size"></Page>
<!-- <xy-table :border="false" :is-page="false" :height="400" :table-item="table1" style="margin-top: 20px" size="mini" stripe ref="table1" :auths="[]" :action="index" :req-opt="select"></xy-table>-->
</div>
</Card>
<drawer ref="drawer"></drawer>
@ -397,8 +399,8 @@
this.radio = e
if (e === 1) {
let date = this.$moment()
let preDate = date.subtract(this.config.time, this.config.unit).format("YYYY-MM-DD")
this.leaseSelect.filter[0].value = `${preDate},${date.format("YYYY-MM-DD")}`
let preDate = date.add(this.config.time, this.config.unit).format("YYYY-MM-DD")
this.leaseSelect.filter[0].value = `${this.$moment().format("YYYY-MM-DD")},${preDate}`
this.leaseSelect.filter[1].value = ''
}
if (e === 2) {

@ -1,35 +1,21 @@
<template>
<div class="btns">
<div class="item">
<SvgIcon icon-class="chart" class="item__icon"></SvgIcon>
<div class="item__text">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 60" preserveAspectRatio="xMinYMin meet">
<path d="M 0 0 L 160 0 L 160 60 L 0 60 Q 30 30 0 0" stroke="currentColor" stroke-width="2" stroke-linecap="round"></path>
</svg>
<p>资产总览</p>
<div class="item" v-for="item in items" :class="{ 'item-active': activeText === item.text }" @click="activeText = item.text">
<div class="item__icon">
<SvgIcon :icon-class="item.icon"></SvgIcon>
</div>
</div>
<div class="item">
<SvgIcon icon-class="chart" class="item__icon"></SvgIcon>
<div class="item__text">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 60" preserveAspectRatio="xMinYMin meet">
<path d="M 0 0 L 160 0 L 160 60 L 0 60 Q 30 30 0 0" stroke="currentColor" stroke-width="2" stroke-linecap="round"></path>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 180 60" preserveAspectRatio="xMinYMin meet">
<defs>
<linearGradient id="active-item-color" x1="50%" y1="0%" x2="50%" y2="100%">
<stop offset="0%" stop-color="#00000066"></stop>
<stop offset="100%" stop-color="#3eb29caa"></stop>
</linearGradient>
</defs>
<path d="M 0 0 L 165 0 Q 180 0 180 15 L 180 45 Q 180 60 165 60 L 0 60 Q 30 30 0 0 z" stroke="currentColor" stroke-width="2" stroke-linecap="round"></path>
</svg>
<p>租赁数据</p>
</div>
</div>
<div class="item">
<SvgIcon icon-class="chart" class="item__icon"></SvgIcon>
<div class="item__text">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 60" preserveAspectRatio="xMinYMin meet">
<path d="M 0 0 L 160 0 L 160 60 L 0 60 Q 30 30 0 0" stroke="currentColor" stroke-width="2" stroke-linecap="round"></path>
</svg>
<p>安全巡检</p>
<p>{{ item.text }}</p>
</div>
</div>
</div>
@ -42,7 +28,14 @@ export default {
SvgIcon
},
data() {
return {}
return {
activeText: "资产总览",
items: [
{ text: "资产总览", icon: "house" },
{ text: "租赁数据", icon: "qiandai" },
{ text: "安全巡检", icon: "weixiu" }
]
}
},
methods: {},
computed: {}
@ -53,27 +46,47 @@ export default {
.btns {
position: absolute;
top: 20%;
left: 0;
left: 8px;
.item {
transition: all .2s;
cursor: pointer;
color: #7bc8b9;
color: #8ecec2;
display: flex;
align-items: center;
&__icon {
color: #7bc8b9;
color: currentColor;
border-radius: 100%;
border: 2px solid #7bc8b9;
width: 60px;
height: 60px;
padding: 6px;
border: 2px dashed currentColor;
width: 50px;
height: 50px;
padding: 10px;
position: relative;
& > svg {
width: 100%;
height: 100%;
}
&::after {
content: "";
width: 60px;
height: 60px;
border-radius: 100%;
border: 2px solid currentColor;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
}
&__text {
height: 60px;
line-height: 60px;
width: 160px;
color: #7bc8b9;
width: 180px;
letter-spacing: 1px;
color: currentColor;
position: relative;
& > svg {
width: 100%;
@ -82,7 +95,7 @@ export default {
position: absolute;
top: 0;
right: 0;
left: -4%;
left: -2%;
bottom: 0;
}
& > p {
@ -94,6 +107,15 @@ export default {
z-index: 2;
}
}
&-active {
color: #3eb29c;
& > .item__text svg {
transition: all .2s;
fill: url(#active-item-color);
}
}
}
.item + .item {
margin-top: 40px;

@ -7,7 +7,7 @@
</div>
<dv-decoration-1 style="width:200px;height:40px;margin-left: 100px;" />
<dv-decoration-2 style="flex: 1;height:5px;" />
<dv-decoration-10 style="flex: 1;height:5px;" />
<div class="header-time">
<p>{{ time.format('YYYY年MM月DD日 HH:mm:ss') }}</p>
@ -71,8 +71,8 @@ export default {
}
&__dvd8 {
height: 36px;
width: 100px;
height: 32px;
width: 120px;
transform: translate(100%, 0);
position: absolute;
bottom: 0;
@ -82,7 +82,7 @@ export default {
&-time {
color: #fff;
font-size: 22px;
padding-right: 40px;
padding: 0 20px;
}
}
</style>

@ -3,14 +3,19 @@
<div class="container" ref="appRef">
<dv-loading v-if="loading">Loading...</dv-loading>
<div v-else>
<dv-decoration-3 style="width:250px;height:30px;position: absolute;bottom: -10px;right: 60px;" />
<HeaderComponent></HeaderComponent>
<div class="body d-flex">
<btns></btns>
<div class="left">
<MapComponent></MapComponent>
<div class="left d-flex flex-column">
<dv-border-box-12>
<MapComponent></MapComponent>
</dv-border-box-12>
<leftBottom class="mt-2"></leftBottom>
</div>
<div class="right d-flex flex-column">
<div class="right d-flex flex-column ml-2">
<dv-border-box-12><right1></right1></dv-border-box-12>
<dv-border-box-12><right2></right2></dv-border-box-12>
</div>
@ -27,13 +32,15 @@ import HeaderComponent from "./header.vue";
import right1 from "./right1.vue";
import right2 from "./right2.vue";
import btns from "./btns.vue";
import leftBottom from "./leftBottom.vue"
export default {
components: {
MapComponent,
HeaderComponent,
right1,
right2,
btns
btns,
leftBottom
},
mixins: [drawMixin],
data() {
@ -56,7 +63,8 @@ export default {
<style scoped lang="scss">
@import "~@/styles/scss/style.scss";
.page {
background: #040608;
background: url("~@/assets/pageBg.png") no-repeat;
background-size: cover;
width: 100vw;
height: 100vh;
overflow: hidden;
@ -74,17 +82,16 @@ export default {
.body {
padding-top: 60px;
padding-left: 16%;
padding-left: 14%;
.left {
flex-basis: 60%;
}
.right {
flex: 1;
padding-right: 60px;
margin-left: 40px;
div + div {
margin-top: 20px;
margin-top: .5rem;
}
}
}

@ -0,0 +1,148 @@
<template>
<div class="d-flex">
<svg style="position: absolute;" width="0" height="0">
<defs>
<linearGradient id="card-item-color" x1="50%" y1="0%" x2="50%" y2="100%">
<stop offset="0%" stop-color="#00000033"></stop>
<stop offset="100%" stop-color="#3eb29c66"></stop>
</linearGradient>
</defs>
</svg>
<dv-border-box-13 v-for="item in items" class="dv-box">
<div class="card">
<div class="card-left">
<p class="card__title">{{ item.text }}</p>
<p class="card__text">
<span class="card__text--num">{{ item.num }}</span>
<span class="card__text--unit">{{ item.unit }}</span>
</p>
</div>
<div class="card-right">
<SvgIcon icon-class="house" class="img"></SvgIcon>
<div class="img-base">
<div class="square1"></div>
</div>
</div>
</div>
</dv-border-box-13>
</div>
</template>
<script>
import SvgIcon from "@/components/SvgIcon"
export default {
components: {
SvgIcon
},
data() {
return {
items: [
{
text: "资产总量",
num: 36650,
unit: "平方"
},
{
text: "土地资产",
num: 99966,
unit: "亩"
},
{
text: "房屋资产",
num: 8888,
unit: "平方"
}
]
}
},
methods: {},
computed: {}
}
</script>
<style scoped lang="scss">
.card {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px 30px;
&__title {
line-height: 2;
font-size: 22px;
font-weight: 600;
color: #73f3df;
}
&__text {
color: #fff;
font-size: 20px;
&--num {
font-size: 28px;
font-weight: 600;
padding-right: 10px;
}
}
& > .card-right {
z-index: 2;
position: relative;
& > .img {
color: #73f3e0;
width: 60px;
height: 60px;
z-index: 3;
transform: translateY(-8px);
position: relative;
}
.img-base {
width: 100%;
perspective: 100px;
z-index: 1;
position: absolute;
left: 0;
right: 0;
bottom: 0;
&::before {
content: "";
width: 110%;
height: 100%;
background: linear-gradient(to bottom, #00000033 , #61b9ac);
transform: translateY(-86%);
position: absolute;
left: -5%;
top: 0;
}
.square1 {
background: linear-gradient(to bottom, #00000033 ,#4fa497);
width: 100%;
height: 34px;
box-shadow: 0 0 2px 2px #7ddacd;
transform: rotateX(45deg);
position: relative;
&::after {
content: "";
width: 120%;
height: 136%;
background: transparent;
border: 2px solid #7ddacd;
position: absolute;
left: -10%;
top: -18%;
}
}
}
}
}
.dv-box + .dv-box {
margin-left: .5rem;
}
</style>
<style>
.dv-box path:nth-child(1) {
fill: url(#card-item-color);
}
</style>

@ -18,8 +18,67 @@ export default {
chart.setOption({
series: [{
type: 'map3D', // map、map3D
map: 'wuxi' // 注册的地图名称
}]
map: 'wuxi', // 注册的地图名称
name: "无锡",
label: {
// 标签的相关设置
show: false, // (地图上的城市名称)是否显示标签 [ default: false ]
// distance: 50, // 标签距离图形的距离,在三维的散点图中这个距离是屏幕空间的像素值,其它图中这个距离是相对的三维距离
// formatter:, // 标签内容格式器
textStyle: {
// 标签的字体样式
color: '#fff', // 地图初始化区域字体颜色
// color: '#000', // 地图初始化区域字体颜色
fontSize: 14, // 字体大小
opacity: 1, // 字体透明度
},
},
itemStyle: {
color: '#3e5e67aa', // 地图板块的颜色borderWidth: 1, // (地图板块间的分隔线)图形描边的宽度。加上描边后可以更清晰的区分每个区域 [ default: 0 ]
borderColor: 'rgb(147, 235, 248)', // 图形描边的颜色。[ default: #333 ]
borderWidth: 2, // (地图板块间的分隔线)图形描边的宽度。加上描边后可以更清晰的区分每个区域 [ default: 0 ]
},
emphasis: {
// 鼠标 hover 高亮时图形和标签的样式 (当鼠标放上去时 label和itemStyle 的样式)
label: {
// TODO label高亮时的配置
show: true
// textStyle: {
// color: '#fff', // 高亮时标签颜色变为 白色
// fontSize: 15 // 高亮时标签字体 变大
// }
},
itemStyle: {
// TODO itemStyle高亮时的配置
color: '#587683' // 高亮时地图板块颜色改变
}
},
groundPlane: {
// 地面可以让整个组件有个“摆放”的地方,从而使整个场景看起来更真实,更有模型感。
show: false, // 是否显示地面。[ default: false ]
color: '#aaa' // 地面颜色。[ default: '#aaa' ]
},
light: {
// 光照相关的设置。在 shading 为 'color' 的时候无效。 光照的设置会影响到组件以及组件所在坐标系上的所有图表。合理的光照设置能够让整个场景的明暗变得更丰富,更有层次。
main: {
// 场景主光源的设置,在 globe 组件中就是太阳光。
color: '#fff', // 主光源的颜色。[ default: #fff ]
intensity: 1.2, // 主光源的强度。[ default: 1 ]
shadow: true, // 主光源是否投射阴影。默认关闭。 开启阴影可以给场景带来更真实和有层次的光照效果。但是同时也会增加程序的运行开销。
// shadowQuality: 'high', // 阴影的质量。可选'low', 'medium', 'high', 'ultra' [ default: 'medium' ]
alpha: 55, // 主光源绕 x 轴,即上下旋转的角度。配合 beta 控制光源的方向。[ default: 40 ]
beta: 20 // 主光源绕 y 轴,即左右旋转的角度。[ default: 40 ]
},
ambient: {
// 全局的环境光设置。
color: '#fff', // 环境光的颜色。[ default: #fff ]
intensity: 0.5 // 环境光的强度。[ default: 0.2 ]
}
}
}],
})
chart.on("click", (params) => {
console.log(params)
})
}
},
@ -34,5 +93,6 @@ export default {
#map {
width: 100%;
height: 100%;
padding: 20px;
}
</style>

@ -1,10 +1,13 @@
<template>
<div>
<div class="ranking bg-color-black">
<span>
<div class="title">
<span>
<icon name="chart-pie" class="text-icon"></icon>
</span>
<span class="fs-xl text mx-2 mb-1 pl-3">年度负责人组件达标榜</span>
<span class="fs-xl text mx-2 mb-1 pl-3">年度负责人组件达标榜</span>
</div>
<dv-scroll-ranking-board class="dv-scr-rank-board mt-1" :config="ranking" />
</div>
</div>
@ -75,5 +78,9 @@ export default {
height: 225px;
padding: 20px;
}
.title {
color: #fff;
padding: 0 20px;
}
}
</style>

@ -2,11 +2,13 @@
<div id="bottomRight">
<div class="bg-color-black">
<div class="d-flex pt-2 pl-2">
<span>
<icon name="chart-area" class="text-icon"></icon>
</span>
<div class="d-flex">
<div class="title">
<span>
<icon name="chart-area" class="text-icon"></icon>
</span>
<span class="fs-xl text mx-2">工单修复以及满意度统计图</span>
</div>
<div class="d-flex">
<div class="decoration2">
<dv-decoration-2 :reverse="true" style="width:5px;height:6rem;" />
</div>
@ -101,4 +103,10 @@ export default {
</script>
<style scoped lang="scss">
#bottomRight {
padding: 20px;
}
.title {
color: #fff;
}
</style>

Loading…
Cancel
Save