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

pref:修改部门板块

parent c1450025
...@@ -4,6 +4,37 @@ ...@@ -4,6 +4,37 @@
<a-button type="primary" @click="showAddModal">新增依据</a-button> <a-button type="primary" @click="showAddModal">新增依据</a-button>
</div> </div>
<div class="table-content"> <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 <a-table
bordered bordered
...@@ -192,11 +223,5 @@ export default { ...@@ -192,11 +223,5 @@ export default {
} }
/deep/.ant-modal-body { /deep/.ant-modal-body {
height: 400px; height: 400px;
.ant-input {
height: 300px;
}
}
.table-content {
height: 650px;
} }
</style> </style>
\ No newline at end of file
...@@ -46,10 +46,7 @@ ...@@ -46,10 +46,7 @@
<a-row> <a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="联系电话" prop="deptTelphone"> <a-form-model-item label="联系电话" prop="deptTelphone">
<a-input <a-input v-model="form.deptTelphone" placeholder="请输入联系电话" />
v-model="form.deptTelphone"
placeholder="请输入座机电话:区号-电话号码"
/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
...@@ -106,16 +103,16 @@ import local from "@/utils/local"; ...@@ -106,16 +103,16 @@ import local from "@/utils/local";
export default { export default {
components: { YSwitch }, components: { YSwitch },
data() { data() {
const changeLandline = (rule, value, callback) => { // const changeLandline = (rule, value, callback) => {
if (!value) { // if (!value) {
callback(new Error("请输入座机号")); // callback(new Error("请输入座机号"));
callback(); // callback();
} else if (!/^[0][1-9]{2,3}-[0-9]{5,10}$/.test(value)) { // } else if (!/^[0][1-9]{2,3}-[0-9]{5,10}$/.test(value)) {
callback(new Error("区号-电话号码")); // callback(new Error("区号-电话号码"));
} else { // } else {
callback(); // callback();
} // }
}; // };
return { return {
labelCol: { span: 6 }, labelCol: { span: 6 },
wrapperCol: { span: 14 }, wrapperCol: { span: 14 },
...@@ -147,9 +144,9 @@ export default { ...@@ -147,9 +144,9 @@ export default {
deptNumber: [ deptNumber: [
{ required: true, message: "部门编号不能为空", trigger: "blur" }, { required: true, message: "部门编号不能为空", trigger: "blur" },
], ],
deptTelphone: [ // deptTelphone: [
{ required: true, validator: changeLandline, trigger: "blur" }, // { required: true, validator: changeLandline, trigger: "blur" },
], // ],
}, },
}; };
}, },
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
>新增窗口</a-button >新增窗口</a-button
> >
<a-input-search <a-input-search
placeholder="请输入窗口名称搜索" placeholder="请输入窗口编号搜索"
v-model="windowSearch" v-model="windowSearch"
allowClear allowClear
enter-button="搜索" enter-button="搜索"
...@@ -506,7 +506,7 @@ export default { ...@@ -506,7 +506,7 @@ export default {
siteId: this.siteId, siteId: this.siteId,
page: this.page, page: this.page,
size: this.size, size: this.size,
name: `%${this.windowSearch}%`, fromnum: `%${this.windowSearch}%`,
deptId: this.deptId, deptId: this.deptId,
...obj, ...obj,
}); });
......
...@@ -474,11 +474,11 @@ export default { ...@@ -474,11 +474,11 @@ export default {
if (!isJpgOrPng) { if (!isJpgOrPng) {
this.$message.error("请上传jpeg或者png格式!"); this.$message.error("请上传jpeg或者png格式!");
} }
const isLt2M = file.size / 1024 / 1024 < 2; const isLt10M = file.size / 1024 / 1024 < 10;
if (!isLt2M) { if (!isLt10M) {
this.$message.error("照片不能超过 2MB!"); this.$message.error("照片不能超过 10MB!");
} }
return isJpgOrPng && isLt2M; return isJpgOrPng && isLt10M;
}, },
}, },
}; };
......
...@@ -546,11 +546,11 @@ export default { ...@@ -546,11 +546,11 @@ export default {
if (!isJpgOrPng) { if (!isJpgOrPng) {
this.$message.error("请上传jpeg或者png格式!"); this.$message.error("请上传jpeg或者png格式!");
} }
const isLt2M = file.size / 1024 / 1024 < 2; const isLt10M = file.size / 1024 / 1024 < 10;
if (!isLt2M) { if (!isLt10M) {
this.$message.error("照片不能超过 2MB!"); 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