Commit 5ddcbde5 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 7491da22 944bdea3
<template>
<a-table
:columns="columns"
:data-source="data"
:bordered="bordered"
:defaultExpandAllRows="DefaultExpandAllRows"
:expandRowByClick="ExpandRowByClick"
:showHeader="ShowHeader"
:pagination="Pagination"
:rowKey="rowKey"
@change="handleTableChange"
v-bind="$attrs"
v-on="$listeners"
>
<template
slot-scope="text, record, index"
:slot="slot"
v-for="slot in Object.keys($scopedSlots).filter(
(key) => key !== 'expandedRowRender'
)"
>
<slot :name="slot" v-bind="{ text, record, index }"></slot>
</template>
<template :slot="slot" v-for="slot in Object.keys($slots)">
<slot :name="slot"></slot>
</template>
<template
slot-scope="record, index, indent, expanded"
:slot="$scopedSlots.expandedRowRender ? 'expandedRowRender' : ''"
>
<slot
v-bind="{ record, index, indent, expanded }"
:name="$scopedSlots.expandedRowRender ? 'expandedRowRender' : ''"
></slot>
</template>
</a-table>
</template>
<script>
import { pageSizeOptions } from "@/config/pageConfig.js";
export default {
props: {
columns: {
required: true,
type: Array,
default: () => [],
},
data: {
required: true,
type: Array,
default: () => [],
},
pageSize: {
required: true,
type: Number,
default: 10,
},
page: {
required: true,
type: Number,
default: 1,
},
total: {
required: true,
type: Number,
default: 0,
},
bordered: {
type: Boolean,
default: true,
},
defaultExpandAllRows: {
type: Boolean,
default: false,
},
expandRowByClick: {
type: Boolean,
default: false,
},
showHeader: {
type: Boolean,
default: true,
},
rowKey: {
type: [String, Function],
default: "id",
},
pagination: {
type: Object,
default: () => {},
},
pageSizeOptions: {
type: Array,
default: () => pageSizeOptions,
},
},
data() {
return {};
},
computed: {
Bordered() {
return !!this.bordered;
},
DefaultExpandAllRows() {
return !!this.defaultExpandAllRows;
},
ExpandRowByClick() {
return !!this.expandRowByClick;
},
ShowHeader() {
return !!this.showHeader;
},
PageSize: {
get() {
return this.pageSize;
},
set(value) {
this.$emit("update:pageSize", value);
},
},
Current: {
get() {
return this.page;
},
set(value) {
this.$emit("update:page", value);
},
},
Pagination() {
return {
showTotal: (total) => `共 ${total} 条`,
total: this.total,
current: this.Current,
pageSize: this.pageSize,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: this.pageSizeOptions,
...this.pagination,
};
},
},
methods: {
handleTableChange(pagination, filters, sorter, { currentDataSource }) {
let { current, pageSize } = pagination;
this.Current = current;
this.PageSize = pageSize;
if (this.$listeners.changePagination) {
this.$listeners.changePagination();
}
this.$emit("change", pagination, filters, sorter, { currentDataSource });
},
},
};
</script>
<style lang="less" scoped></style>
<template>
<div class="y-upload">
<a-upload
v-if="listType == 'text' || listType == 'picture'"
:name="name"
:listType="listType"
:multiple="multiple"
:action="action"
:accept="accept"
:beforeUpload="beforeUpload"
:file-list="FileList"
v-bind="$attrs"
v-on="$listeners"
@change="handleChange"
@preview="handlePreview"
>
<slot>
<a-button type="primary"> <a-icon type="upload" />点击上传</a-button>
</slot>
</a-upload>
<a-upload
v-else-if="listType == 'picture-card'"
:name="name"
:listType="listType"
:multiple="multiple"
:action="action"
:accept="accept"
:beforeUpload="beforeUpload"
:file-list="FileList"
v-bind="$attrs"
v-on="$listeners"
@change="handleChange"
@preview="handlePreview"
>
<slot>
<div>
<a-icon type="plus" />
<div class="ant-upload-text">点击上传</div>
</div>
</slot>
</a-upload>
<!-- 视频、音频预览 -->
<div class="modal" v-if="previewVisible">
<video
v-if="previewData.type == 'video'"
:src="previewData.url"
autoplay
muted
controls
></video>
<audio
v-if="previewData.type == 'audio'"
:src="previewData.url"
autoplay
controls
></audio>
<a-icon type="close-circle" @click="previewVisible = false" />
</div>
</div>
</template>
<script>
// import { uploadFile } from "@/services/user";
export default {
model: {
prop: "value",
event: "onChange",
},
components: {},
props: {
name: {
type: String,
default: "file",
},
listType: {
type: String,
default: "text",
},
multiple: {
type: Boolean,
default: false,
},
value: {
type: [String, Array],
default: "",
},
// 文件限制
accept: {
type: String,
default: "",
},
// 上传数量
limit: {
type: Number,
validator: (value) => {
return value >= 0;
},
default: 1, // 0为不限制
},
// 上传文件大小限制mb 0为不限制
MB: {
type: Number,
validator: (value) => {
return value >= 0;
},
default: 10,
},
action: {
type: String,
default: "/base/file/commonupload",
},
},
data() {
return {
FileList: [],
imageType: ["png", "jpg", "jpeg", "gif", "svg"],
videoType: ["mp4", "avi", "wmv", "rmvb", "flv", "mkv"],
audioType: [
"mp3",
"wav",
"amr",
"aac",
"ogg",
"wma",
"flac",
"ape",
"mid",
"m4a",
"m4r",
"m4p",
"m4b",
],
previewData: {
type: "",
url: "",
},
previewVisible: false,
};
},
watch: {
value: {
handler(newValue) {
if (newValue) {
if (Array.isArray(newValue)) {
this.FileList = newValue.map((v) => {
let index = v.lastIndexOf("/");
let name = v.slice(index + 1);
return {
uid: v,
name,
status: "done",
url: v,
};
});
} else {
this.FileList = newValue.split(",").map((v) => {
let index = v.lastIndexOf("/");
let name = v.slice(index + 1);
return {
uid: v,
name,
status: "done",
url: v,
};
});
}
} else {
this.FileList = [];
}
},
deep: true,
immediate: true,
},
},
computed: {},
created() {},
methods: {
customRequest() {
console.log(arguments);
},
handleChange({ file, fileList }) {
this.FileList = [...fileList];
if (file.status == "done" || file.status == "removed") {
if (file.response && file.response.code == -1) {
this.$message.error(file.response.msg);
fileList = fileList.filter((file) => file.response.code != -1);
}
if (this.limit) {
this.FileList = [...fileList].slice(-this.limit);
}
this.FileList = this.FileList.map((v) => {
if (v.response) {
v.url = v.response.url;
}
return v;
});
let value;
if (Array.isArray(this.value)) {
value = this.FileList.map((v) => v.url);
} else {
value = this.FileList.map((v) => v.url).join(",");
}
this.$emit("onChange", value);
this.$emit("onSuccess", { file, fileList });
}
},
beforeUpload(file) {
let isType = true;
let isExceed = true;
return new Promise((resolve) => {
if (this.accept) {
const fileType = this.accept.split(","); // 限制文件类型
let index = file.name.lastIndexOf(".");
let type = file.name.slice(index);
isType = fileType.includes(type);
}
if (!isType) {
let msg = this.accept.replaceAll(",", "或者");
this.$message.error(`请上传${msg}文件!`);
}
if (this.MB) {
isExceed = file.size / 1024 / 1024 <= this.MB;
}
if (!isExceed) {
this.$message.error(`文件大小不能超过${this.MB}MB!`);
}
if (isType && isExceed) {
resolve(file);
}
});
},
// 预览
handlePreview(file) {
let { url } = file;
if (!url) return;
let index = url.lastIndexOf(".");
let type = url.slice(index + 1);
if (this.imageType.includes(type)) {
this.$viewerApi({
images: [url],
});
} else if (this.videoType.includes(type)) {
this.previewData.type = "video";
this.previewData.url = url;
this.previewVisible = true;
} else if (this.audioType.includes(type)) {
this.previewData.type = "audio";
this.previewData.url = url;
this.previewVisible = true;
} else {
let a = document.createElement("a");
a.href = url;
a.download = file.name;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
}
},
handleDownload(file) {
console.log(file);
},
},
};
</script>
<style lang="less" scoped>
/deep/.ant-upload-picture-card-wrapper {
display: flex;
flex-wrap: wrap;
}
.modal {
width: 100%;
height: 100%;
position: fixed;
left: 0px;
top: 0px;
background: rgba(0, 0, 0, 0.5);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 10px;
z-index: 999;
video {
height: 400px;
}
.anticon-close-circle {
font-size: 36px;
color: #fff;
cursor: pointer;
}
}
</style>
<template> <template>
<div> <div>
<a-checkbox :checked="value" @change="onChange"> <a-checkbox :checked="value" @change="onChange">
{{ checkText }}</a-checkbox <slot></slot>
> </a-checkbox>
</div> </div>
</template> </template>
...@@ -16,10 +16,6 @@ export default { ...@@ -16,10 +16,6 @@ export default {
checked: { checked: {
required: true, required: true,
}, },
checkText: {
required: true,
default: "",
},
}, },
computed: { computed: {
value() { value() {
...@@ -34,5 +30,4 @@ export default { ...@@ -34,5 +30,4 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
</style>
\ No newline at end of file
...@@ -181,19 +181,22 @@ ...@@ -181,19 +181,22 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="中心Logo" prop="logoPath"> <a-form-model-item label="中心Logo" prop="logoPath">
<a-upload <YUpload
:action="api + 'base/file/commonupload'" accept=".png,.jpg,.jpeg,.svg"
list-type="picture-card" :limit="1"
:file-list="fileList" v-model="formInfo.logoPath"
@preview="handlePreview" listType="picture-card"
@change="handleChange" ></YUpload>
:accept="accept" </a-form-model-item>
> </a-col>
<div v-if="fileList.length < 1"> <a-col :span="24">
<a-icon type="plus" /> <a-form-model-item class="site-style" label="站点风貌" prop="govAffairStyle">
<div class="ant-upload-text">上传图片</div> <YUpload
</div> accept=".png,.jpg,.jpeg,.svg"
</a-upload> :limit="0"
v-model="formInfo.govAffairStyle"
listType="picture-card"
></YUpload>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
...@@ -237,33 +240,12 @@ ...@@ -237,33 +240,12 @@
</a-row> </a-row>
<a-form-model-item label="工作日"> <a-form-model-item label="工作日">
<y-checkbox <y-checkbox
v-model="formInfo.workday1" v-model="formInfo[key]"
checkText="星期一" v-for="(v, key) in workday"
></y-checkbox> :key="key"
<y-checkbox >
v-model="formInfo.workday2" {{ v }}
checkText="星期二" </y-checkbox>
></y-checkbox>
<y-checkbox
v-model="formInfo.workday3"
checkText="星期三"
></y-checkbox>
<y-checkbox
v-model="formInfo.workday4"
checkText="星期四"
></y-checkbox>
<y-checkbox
v-model="formInfo.workday5"
checkText="星期五"
></y-checkbox>
<y-checkbox
v-model="formInfo.workday6"
checkText="星期六"
></y-checkbox>
<y-checkbox
v-model="formInfo.workday7"
checkText="星期天"
></y-checkbox>
</a-form-model-item> </a-form-model-item>
<a-row> <a-row>
<a-col :span="4"> <a-col :span="4">
...@@ -306,9 +288,19 @@ ...@@ -306,9 +288,19 @@
import { modelList, siteSave } from "@/services/basicsetFun"; import { modelList, siteSave } from "@/services/basicsetFun";
import YCheckbox from "@/components/ycheckbox/YCheckbox.vue"; import YCheckbox from "@/components/ycheckbox/YCheckbox.vue";
import YSwitch from "@/components/yswitch/YSwitch.vue"; import YSwitch from "@/components/yswitch/YSwitch.vue";
import YUpload from "@/components/YUpload.vue";
// import options from "@/utils/city"; // import options from "@/utils/city";
import { regionData } from "element-china-area-data"; import { regionData } from "element-china-area-data";
import { checkPort, checkIp } from "@/utils/validate"; import { checkPort, checkIp } from "@/utils/validate";
const workday = {
workday1: "星期一",
workday2: "星期二",
workday3: "星期三",
workday4: "星期四",
workday5: "星期五",
workday6: "星期六",
workday7: "星期天",
};
export default { export default {
props: { props: {
formVisible: { formVisible: {
...@@ -323,10 +315,11 @@ export default { ...@@ -323,10 +315,11 @@ export default {
components: { components: {
YCheckbox, YCheckbox,
YSwitch, YSwitch,
YUpload,
}, },
data() { data() {
// 验证手机号码 // 验证手机号码
const changePhone = (rule, value, callback) => { const changePhone = (rule, value, callback) => {
if (!value) { if (!value) {
callback(new Error("请输入手机号")); callback(new Error("请输入手机号"));
callback(); callback();
...@@ -336,17 +329,8 @@ export default { ...@@ -336,17 +329,8 @@ export default {
callback(); callback();
} }
}; };
// const changeLandline = (rule, value, callback) => {
// if (!value) {
// callback(new Error("请输入中心座机号"));
// callback();
// } else if (!/^[0][1-9]{2,3}-[0-9]{5,10}$/.test(value)) {
// callback(new Error("格式:区号-电话号码"));
// } else {
// callback();
// }
// };
return { return {
workday,
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
accept: "image/jpeg,image/png", // 上传类型 accept: "image/jpeg,image/png", // 上传类型
loading: false, loading: false,
...@@ -396,10 +380,10 @@ export default { ...@@ -396,10 +380,10 @@ export default {
onlineTake: 0, // 在线取号 onlineTake: 0, // 在线取号
appointment: 0, // 微预约 appointment: 0, // 微预约
gowMap: 0, // 政务地图 gowMap: 0, // 政务地图
govAffairStyle:'', // 站点风貌
}, //表单提交数据 }, //表单提交数据
indeterminate: true, indeterminate: true,
checkAll: false, checkAll: false,
fileList: [],
formRules: { formRules: {
siteName: [ siteName: [
{ {
...@@ -595,14 +579,12 @@ export default { ...@@ -595,14 +579,12 @@ export default {
}, },
//重置 //重置
resetForm() { resetForm() {
this.fileList = [];
this.cityData = []; this.cityData = [];
this.$refs.ruleForm.resetFields(); this.$refs.ruleForm.resetFields();
}, },
// 关闭对话框 // 关闭对话框
closeModal() { closeModal() {
this.fileList = []; this.resetForm();
this.$refs.ruleForm.resetFields();
this.Visible = false; this.Visible = false;
}, },
// 新增 // 新增
...@@ -614,30 +596,43 @@ export default { ...@@ -614,30 +596,43 @@ export default {
// 编辑 // 编辑
onEdit(data) { onEdit(data) {
this.$nextTick(() => { this.$nextTick(() => {
this.formInfo = { ...data }; let {
this.areaInfo.areaID = this.formInfo.areaID; areaID,
this.areaInfo.areaCode = this.formInfo.areaCode; areaCode,
this.areaInfo.areaName = this.formInfo.areaName; areaName,
this.cityData = [ proCode,
this.formInfo.proCode, cityCode,
this.formInfo.cityCode, districtCode,
this.formInfo.districtCode, modelIds,
]; amWorkStartTime,
this.formInfo.modelIds = this.formInfo.modelIds.map(Number); amWorkEndTime,
this.formInfo.amWorkStartTime = String(this.formInfo.amWorkStartTime); pmWorkStartTime,
this.formInfo.amWorkEndTime = String(this.formInfo.amWorkEndTime); pmWorkEndTime,
this.formInfo.pmWorkStartTime = String(this.formInfo.pmWorkStartTime); } = (this.formInfo = data);
this.formInfo.pmWorkEndTime = String(this.formInfo.pmWorkEndTime); this.areaInfo.areaID = areaID;
if (this.formInfo.logoPath) { this.areaInfo.areaCode = areaCode;
this.fileList = [ this.areaInfo.areaName = areaName;
{ this.cityData = [proCode, cityCode, districtCode];
uid: -1, if (modelIds) {
status: "done", this.formInfo.modelIds = modelIds && modelIds.map(Number);
name: this.formInfo.logoPath,
url: this.formInfo.logoPath,
},
];
} }
[
this.formInfo.amWorkStartTime,
this.formInfo.amWorkEndTime,
this.formInfo.pmWorkStartTime,
this.formInfo.pmWorkEndTime,
] = [
amWorkStartTime,
amWorkEndTime,
pmWorkStartTime,
pmWorkEndTime,
].map((v) => {
if (v) {
return String(v);
} else {
return "";
}
});
}); });
}, },
// 保存 // 保存
...@@ -658,68 +653,20 @@ export default { ...@@ -658,68 +653,20 @@ export default {
this.loading = false; this.loading = false;
if (code === 1) { if (code === 1) {
this.$message.success(msg); this.$message.success(msg);
this.fileList = []; this.closeModal();
this.Visible = false;
this.$parent.getSiteList({ areaID: this.areaInfo.areaID }); this.$parent.getSiteList({ areaID: this.areaInfo.areaID });
} }
} }
}); });
}, },
// 上传限制
beforeUpload(file) {
const isJpgOrPng =
file.type === "image/jpeg" || file.type === "image/png";
if (!isJpgOrPng) {
this.$message.error("请上传jpeg或者png图片!");
}
const isLt10M = file.size / 1024 / 1024 < 10;
if (!isLt10M) {
this.$message.error("图片大小不能超过10MB!");
}
return isJpgOrPng && isLt10M;
},
// 上传图片
handleChange({ file, fileList }) {
if (
file.status &&
file.status != "removed" &&
file.response &&
file.response.code == -1
) {
this.$message.error(file.response.msg);
fileList = fileList.filter((file) => file.response.code != -1);
}
this.fileList = [...fileList].slice(-1);
this.fileList = this.fileList.map((v) => {
if (v.response) {
v.url = v.response.url;
}
return v;
});
if (this.fileList[0]) {
this.formInfo.logoPath = this.fileList[0].url;
} else {
this.formInfo.logoPath = "";
}
// if (info.file.status === "uploading") {
// this.loading = true;
// return;
// }
// if (info.file.status === "done") {
// this.formInfo.logoPath = info.file.response.url;
// this.loading = false;
// }
},
// 预览logo // 预览logo
handlePreview(info) { handlePreview(info) {
this.$viewerApi({ this.$viewerApi({
images: [info.url], images: [info.url],
}); });
}, },
// 删除logo
// handleRemove() {
// this.formInfo.logoPath = "";
// },
// 地址 // 地址
oncityChange(val) { oncityChange(val) {
[ [
...@@ -728,6 +675,7 @@ export default { ...@@ -728,6 +675,7 @@ export default {
this.formInfo.districtCode, this.formInfo.districtCode,
] = val; ] = val;
}, },
// 获取详细地址经纬度
getAddress(address) { getAddress(address) {
this.$refs.ruleForm.validateField("detailAddress", (errVal) => { this.$refs.ruleForm.validateField("detailAddress", (errVal) => {
if (errVal !== "中心详细地址不能为空") { if (errVal !== "中心详细地址不能为空") {
...@@ -833,4 +781,5 @@ export default { ...@@ -833,4 +781,5 @@ export default {
margin-bottom: 6px; margin-bottom: 6px;
} }
} }
</style> </style>
...@@ -17,14 +17,14 @@ ...@@ -17,14 +17,14 @@
>同步数据</a-button >同步数据</a-button
> >
<a-button <a-button
type="primary"
v-permission="[1]" v-permission="[1]"
type="primary"
@click="editSiteInfo(siteData[0])" @click="editSiteInfo(siteData[0])"
>编辑</a-button >编辑</a-button
> >
<a-button <a-button
type="danger"
v-permission="[1]" v-permission="[1]"
type="danger"
@click="deleteSite(siteData[0].id, 0)" @click="deleteSite(siteData[0].id, 0)"
>删除</a-button >删除</a-button
> >
...@@ -160,27 +160,14 @@ ...@@ -160,27 +160,14 @@
<a-row> <a-row>
<a-col :span="16"> <a-col :span="16">
<span>工作日:</span> <span>工作日:</span>
<span class="work-day" v-if="item.workday1 === 1" <template v-for="(day, i) in workday">
>星期一</span <span
> :key="day"
<span class="work-day" v-if="item.workday2 === 1" class="work-day"
>星期二</span v-if="item[`workday${i + 1}`]"
> >{{ day }}</span
<span class="work-day" v-if="item.workday3 === 1" >
>星期三</span </template>
>
<span class="work-day" v-if="item.workday4 === 1"
>星期四</span
>
<span class="work-day" v-if="item.workday5 === 1"
>星期五</span
>
<span class="work-day" v-if="item.workday6 === 1"
>星期六</span
>
<span class="work-day" v-if="item.workday7 === 1"
>星期天</span
>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
...@@ -196,7 +183,9 @@ ...@@ -196,7 +183,9 @@
v-for="(v, i) in item.modelData" v-for="(v, i) in item.modelData"
:key="i" :key="i"
> >
<div class="item-text">
{{ v }} {{ v }}
</div>
</div> </div>
</div> </div>
</a-col> </a-col>
...@@ -267,6 +256,15 @@ import { ...@@ -267,6 +256,15 @@ import {
getSiteList, getSiteList,
SyncSiteData, SyncSiteData,
} from "@/services/basicsetFun"; } from "@/services/basicsetFun";
const workday = [
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六",
"星期日",
];
export default { export default {
components: { components: {
sitetree, sitetree,
...@@ -277,6 +275,7 @@ export default { ...@@ -277,6 +275,7 @@ export default {
data() { data() {
return { return {
workday,
loading: false, loading: false,
title: "新增站点", title: "新增站点",
formVisible: false, formVisible: false,
...@@ -310,7 +309,7 @@ export default { ...@@ -310,7 +309,7 @@ export default {
if (res.data.code === 1) { if (res.data.code === 1) {
let { data, dict } = res.data.data; let { data, dict } = res.data.data;
data.forEach((v) => { data.forEach((v) => {
v.modelIds = v.modelIds.split(","); v.modelIds = v.modelIds && v.modelIds.split(",");
v.modelData = Object.keys(dict.modelIds) v.modelData = Object.keys(dict.modelIds)
.reduce( .reduce(
(pre, cur) => ( (pre, cur) => (
...@@ -329,10 +328,9 @@ export default { ...@@ -329,10 +328,9 @@ export default {
async getSiteInfo() { async getSiteInfo() {
this.loading = true; this.loading = true;
let res = await siteInfo({ id: this.siteId }); let res = await siteInfo({ id: this.siteId });
this.loading = false;
if (res.data.code === 1) { if (res.data.code === 1) {
let { data, dict } = res.data; let { data, dict } = res.data;
data.modelIds = data.modelIds.split(","); data.modelIds = data.modelIds && data.modelIds.split(",");
data.modelData = Object.keys(dict.modelIds) data.modelData = Object.keys(dict.modelIds)
.reduce( .reduce(
(pre, cur) => ( (pre, cur) => (
...@@ -345,6 +343,7 @@ export default { ...@@ -345,6 +343,7 @@ export default {
}); });
this.siteData = [data]; this.siteData = [data];
} }
this.loading = false;
}, },
// 删除 // 删除
...@@ -378,18 +377,18 @@ export default { ...@@ -378,18 +377,18 @@ export default {
}, },
//查看全部 //查看全部
cookAll(text) { cookAll(text) {
this.allShow = true;
this.details = text; this.details = text;
this.allShow = true;
}, },
//新增站点 //新增站点
addSiteAll() { addSiteAll() {
if (this.areaID) { if (!this.areaID) {
this.title = "新增站点";
this.formVisible = true;
this.$refs.addsite.onAdd();
} else {
this.$message.warning("请先选择区域"); this.$message.warning("请先选择区域");
return;
} }
this.title = "新增站点";
this.formVisible = true;
this.$refs.addsite.onAdd();
}, },
// 切换站点 // 切换站点
changePage(num) { changePage(num) {
...@@ -399,10 +398,11 @@ export default { ...@@ -399,10 +398,11 @@ export default {
this.formVisible = false; this.formVisible = false;
}, },
// 编辑 // 编辑
editSiteInfo(data) { editSiteInfo(row) {
this.title = "编辑站点"; this.title = "编辑站点";
this.formVisible = true; let data = this.$_.cloneDeep(row);
this.$refs.addsite.onEdit(data); this.$refs.addsite.onEdit(data);
this.formVisible = true;
}, },
// 同步数据 // 同步数据
handleSync(id) { handleSync(id) {
...@@ -564,18 +564,24 @@ export default { ...@@ -564,18 +564,24 @@ export default {
.item_box { .item_box {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 10px;
.item { .item {
width: 140px; width: 140px;
height: 54px; height: 54px;
margin-right: 10px;
margin-bottom: 10px;
padding: 6px; padding: 6px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #38b6ff; background-color: #38b6ff;
text-align: center;
color: #fff; color: #fff;
border-radius: 5px; border-radius: 5px;
.item-text{
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment