Commit 30f2ebe8 authored by “yiyousong”'s avatar “yiyousong”

pref:修改部门板块

parent c1450025
......@@ -4,6 +4,37 @@
<a-button type="primary" @click="showAddModal">新增依据</a-button>
</div>
<div class="table-content">
<a-table
bordered
:loading="loading"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: current,
total: total,
pageSize: size,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onChange: handlechange,
onShowSizeChange: showSizeChange,
}"
:scroll="{ y: 550 }"
:columns="columns"
:data-source="tableData"
:rowKey="(record) => record.id"
>
<template slot="num" slot-scope="text, record, index">
{{ (current - 1) * size + index + 1 }}
</template>
<template slot="more" slot-scope="text">
<a class="look-more" @click="lookMore(text)">查看详情</a>
</template>
<template slot="active" slot-scope="text">
<a class="edit" @click="handleEdit(text)">编辑</a>
<a class="delete" @click="handleDel(text.id)">删除</a>
</template>
</a-table>
<!-- 表格 -->
<a-table
bordered
......@@ -192,11 +223,5 @@ export default {
}
/deep/.ant-modal-body {
height: 400px;
.ant-input {
height: 300px;
}
}
.table-content {
height: 650px;
}
</style>
\ No newline at end of file
......@@ -46,10 +46,7 @@
<a-row>
<a-col :span="12">
<a-form-model-item label="联系电话" prop="deptTelphone">
<a-input
v-model="form.deptTelphone"
placeholder="请输入座机电话:区号-电话号码"
/>
<a-input v-model="form.deptTelphone" placeholder="请输入联系电话" />
</a-form-model-item>
</a-col>
<a-col :span="12">
......@@ -106,16 +103,16 @@ import local from "@/utils/local";
export default {
components: { YSwitch },
data() {
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();
}
};
// 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 {
labelCol: { span: 6 },
wrapperCol: { span: 14 },
......@@ -147,9 +144,9 @@ export default {
deptNumber: [
{ required: true, message: "部门编号不能为空", trigger: "blur" },
],
deptTelphone: [
{ required: true, validator: changeLandline, trigger: "blur" },
],
// deptTelphone: [
// { required: true, validator: changeLandline, trigger: "blur" },
// ],
},
};
},
......
......@@ -78,7 +78,7 @@
>新增窗口</a-button
>
<a-input-search
placeholder="请输入窗口名称搜索"
placeholder="请输入窗口编号搜索"
v-model="windowSearch"
allowClear
enter-button="搜索"
......@@ -506,7 +506,7 @@ export default {
siteId: this.siteId,
page: this.page,
size: this.size,
name: `%${this.windowSearch}%`,
fromnum: `%${this.windowSearch}%`,
deptId: this.deptId,
...obj,
});
......
......@@ -474,11 +474,11 @@ export default {
if (!isJpgOrPng) {
this.$message.error("请上传jpeg或者png格式!");
}
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
this.$message.error("照片不能超过 2MB!");
const isLt10M = file.size / 1024 / 1024 < 10;
if (!isLt10M) {
this.$message.error("照片不能超过 10MB!");
}
return isJpgOrPng && isLt2M;
return isJpgOrPng && isLt10M;
},
},
};
......
......@@ -546,11 +546,11 @@ export default {
if (!isJpgOrPng) {
this.$message.error("请上传jpeg或者png格式!");
}
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
this.$message.error("照片不能超过 2MB!");
const isLt10M = file.size / 1024 / 1024 < 10;
if (!isLt10M) {
this.$message.error("照片不能超过 10MB!");
}
return isJpgOrPng && isLt2M;
return isJpgOrPng && isLt10M;
},
},
};
......
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