Commit 88ce81d7 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 7c066772 a12b5efd
<template>
<div class="addmatter">
<a-tabs default-active-key="1">
<a-tabs v-model="active">
<div slot="tabBarExtraContent">
<a-space>
<a-button @click="handleManage">返回事项列表</a-button>
<a-button @click="handleBack">返回概要列表</a-button>
</a-space>
</div>
<a-tab-pane key="1" tab="基本信息">
<a-tab-pane :key="1" tab="基本信息">
<BaseMessage />
</a-tab-pane>
<a-tab-pane key="2" tab="申请材料">
<ApplyMaterial />
<a-tab-pane :key="2" tab="申请材料">
<ApplyMaterial v-if="active == 2" />
</a-tab-pane>
<a-tab-pane key="3" tab="受理材料">
<accept-material></accept-material>
<a-tab-pane :key="3" tab="受理材料">
<accept-material v-if="active == 3"></accept-material>
</a-tab-pane>
<a-tab-pane key="4" tab="办理流程">
<Flow />
<a-tab-pane :key="4" tab="办理流程">
<Flow v-if="active == 4" />
</a-tab-pane>
<a-tab-pane key="5" tab="收费标准">
<Rates />
<a-tab-pane :key="5" tab="收费标准">
<Rates v-if="active == 5" />
</a-tab-pane>
<a-tab-pane key="6" tab="设定依据">
<Pursuant />
<a-tab-pane :key="6" tab="设定依据">
<Pursuant v-if="active == 6" />
</a-tab-pane>
<a-tab-pane key="7" tab="中介服务">
<Agency />
<a-tab-pane :key="7" tab="中介服务">
<Agency v-if="active == 7" />
</a-tab-pane>
<a-tab-pane key="8" tab="常见问题">
<Question />
<a-tab-pane :key="8" tab="常见问题">
<Question v-if="active == 8" />
</a-tab-pane>
</a-tabs>
</div>
......@@ -54,7 +54,9 @@ import Agency from "./components/agency.vue";
import Question from "./components/question.vue";
export default {
data() {
return {};
return {
active: 1,
};
},
components: {
......
......@@ -300,10 +300,10 @@
</a-row>
</a-form-model>
<div class="btn_box">
<a-button type="primary" class="mr" @click="handleOk" :loading="loading">
<a-button class="mr" @click="handleReset"> 重置 </a-button>
<a-button type="primary" @click="handleOk" :loading="loading">
确定
</a-button>
<a-button @click="handleReset"> 重置 </a-button>
</div>
</div>
</template>
......
......@@ -37,7 +37,12 @@
</a-table>
</div>
<!-- 新增受理条件 -->
<a-modal v-model="visible" :title="title">
<a-modal
v-model="visible"
:title="title"
@cancel="handleClose"
:maskClosable="false"
>
<template slot="footer">
<a-button @click="handleClose">关闭</a-button>
<a-button type="primary" @click="handleOk">确定</a-button>
......
......@@ -7,24 +7,20 @@
:labelCol="{ span: 8 }"
:wrapperCol="{ span: 16 }"
>
<a-form-model-item label="中介服务">
<a-radio-group v-model="isHave" @change="chagneHave">
<a-radio :value="true"> 具有 </a-radio>
<a-radio :value="false"> 不具有 </a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item label="中介服务事项名称" prop="title">
<a-input placeholder="请输入事项名称" v-model="form.title" />
<a-input
:disabled="!isHave"
placeholder="请输入事项名称"
v-model="form.title"
/>
</a-form-model-item>
<!-- <a-form-model-item label="所属事项" prop="matterId">
<a-select
allowClear
@select="handleSelect"
v-model="form.matterId"
placeholder="请选择所属事项"
>
<a-select-option
v-for="v in matterList"
:key="v.id"
:value="v.matterId"
>{{ v.matterName }}</a-select-option
>
</a-select>
</a-form-model-item> -->
<a-form-model-item
label="中介服务实施机构及资质资格要求"
prop="intermediaryRequest"
......@@ -32,6 +28,7 @@
<a-textarea
v-model="form.intermediaryRequest"
placeholder="请输入要求"
:disabled="!isHave"
:rows="4"
allow-clear
/>
......@@ -39,6 +36,7 @@
<a-form-model-item label="服务时限" prop="intermediaryRequestTime">
<a-input
placeholder="请输入服务时限"
:disabled="!isHave"
v-model="form.intermediaryRequestTime"
/>
</a-form-model-item>
......@@ -47,23 +45,37 @@
v-model="form.remark"
placeholder="请输入备注"
:rows="4"
:disabled="!isHave"
allow-clear
/>
</a-form-model-item>
<a-form-model-item :wrapper-col="{ span: 14, offset: 12 }">
<a-button type="primary" @click="onSubmit"> 确定 </a-button>
<a-button style="margin-left: 10px" @click="resetForm"> 重置 </a-button>
<a-button
:disabled="!isHave"
style="margin-right: 10px"
@click="resetForm"
>
重置
</a-button>
<a-button :disabled="!isHave" type="primary" @click="onSubmit">
确定
</a-button>
</a-form-model-item>
</a-form-model>
</div>
</template>
<script>
import { addMatterintermediary } from "@/services/matter";
import {
addMatterintermediary,
getMatterintermediaryList,
delMatterintermediary,
} from "@/services/matter";
import local from "@/utils/local";
export default {
data() {
return {
isHave: false,
matterList: [],
siteId: "",
form: {
......@@ -93,21 +105,28 @@ export default {
},
};
},
created() {},
created() {
this.getMatterintermediaryList();
},
methods: {
// 获取站点事项列表
// async getSiteMatterList() {
// this.siteId = this.$route.query.siteId;
// let res = await getSiteMatterList({ siteId: this.siteId });
// this.matterList = res.data.data.data;
// },
// // 事项下拉选择
// handleSelect(val, node) {
// let { text } = node.componentOptions.children[0];
// this.form.matterName = text;
// },
// 获取办理流程列表
async getMatterintermediaryList() {
if (!local.getLocal("matter")) return;
let res = await getMatterintermediaryList({
page: 1,
size: -1,
matterId: local.getLocal("matter").id,
matterName: local.getLocal("matter").matterName,
});
if (res.data.code === 1 && res.data.data.data.length) {
this.form = res.data.data.data[0];
this.isHave = true;
} else {
Object.assign(this.form, this.$options.data().form);
this.form.id && this.$delete(this.form, "id");
this.isHave = false;
}
},
onSubmit() {
if (!local.getLocal("matter")) {
this.$message.warning("请先新增基本信息");
......@@ -123,8 +142,7 @@ export default {
let { code, msg } = res.data;
if (code === 1) {
this.$message.success(msg);
} else {
this.$message.error(msg);
this.getMatterintermediaryList();
}
}
});
......@@ -132,6 +150,18 @@ export default {
resetForm() {
this.$refs.formData.resetFields();
},
async chagneHave() {
if (!this.isHave && this.form.id) {
let res = await delMatterintermediary({ id: this.form.id });
let { code, msg } = res.data;
if (code === 1) {
this.$message.success(msg);
this.getMatterintermediaryList();
}
} else if (this.isHave) {
this.$refs.formData.resetFields();
}
},
},
};
</script>
......@@ -145,11 +175,9 @@ export default {
/deep/ .ant-form-item-control {
margin-bottom: 10px;
}
/deep/.ant-col-8 {
width: 33.33333333% !important;
}
/deep/.ant-input {
width: 100% !important;
/deep/.ant-form-item {
display: flex;
align-items: center;
}
}
</style>
\ No newline at end of file
......@@ -796,10 +796,10 @@
</div>
<div class="btn_box mb20">
<a-button type="primary" class="mr" @click="handleOk" :loading="loading">
<a-button class="mr" @click="handleReset"> 重置 </a-button>
<a-button type="primary" @click="handleOk" :loading="loading">
确定
</a-button>
<a-button @click="handleReset"> 重置 </a-button>
</div>
</div>
</template>
......
......@@ -27,6 +27,10 @@
<template slot="num" slot-scope="text, record, index">
{{ (current - 1) * size + index + 1 }}
</template>
<!-- 法规类型 -->
<template slot="policyType" slot-scope="text">
{{ filterType(text.policyType) }}
</template>
<!-- 查看详情 -->
<template slot="more" slot-scope="text">
<a class="look-more" @click="lookMore(text)">查看详情</a>
......@@ -75,7 +79,7 @@ const columns = [
},
{
title: "法规类型",
dataIndex: "policyType",
scopedSlots: { customRender: "policyType" },
},
{
title: "条例",
......@@ -173,15 +177,39 @@ export default {
},
// 删除
async handleDel(val) {
let res = await delMattersetbase({ id: val });
let { code, msg } = res.data;
if (code === 1) {
this.$message.success(msg);
this.getMattersetbaseData();
} else {
this.$message.error(msg);
}
handleDel(id) {
let _this = this;
this.$confirm({
title: "系统提示",
content: "删除不可恢复,确定要删除吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
icon: "exclamation-circle",
maskClosable: true,
async onOk() {
let res = await delMattersetbase({ id });
let { code, msg } = res.data;
if (code === 1) {
_this.$message.success(msg);
_this.getMattersetbaseData();
}
},
onCancel() {
console.log("Cancel");
},
});
},
// 过滤法规类型
filterType(key) {
let val = "--";
Object.keys(this.dict.policyType).forEach((keys) => {
if (key == keys) {
val = this.dict.policyType[keys];
}
});
return val;
},
},
};
......
......@@ -7,33 +7,37 @@
<!-- 表格 -->
<a-table
bordered
:pagination="false"
: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">
{{ index + 1 }}
{{ (current - 1) * size + index + 1 }}
</template>
<template slot="active" slot-scope="text">
<a class="look-more" @click="handleMore(text)">查看详情</a>
<a class="edit" @click="handleEdit(text)">编辑</a>
<a-popconfirm
title="删除不可恢复,确定要删除吗?"
@confirm="handleDel(text.id)"
>
<a-icon slot="icon" type="question-circle-o" style="color: red" />
<a class="delete">删除</a>
</a-popconfirm>
<a-space size="middle">
<a class="look-more" @click="handleMore(text)">查看详情</a>
<a class="edit" @click="handleEdit(text)">编辑</a>
<a class="delete" @click="handleDel(text.id)">删除</a>
</a-space>
</template>
</a-table>
</div>
<!-- 分页 -->
<a-pagination
@change="handleChange"
v-model="current"
:total="total"
show-less-items
/>
<!-- 新增问题 -->
<a-modal v-model="visible" :title="title" @cancel="handleClose">
<template slot="footer">
......@@ -41,27 +45,21 @@
<a-button @click="handleInit">重置</a-button>
</template>
<a-form-model :model="form" ref="formData" :rules="rules">
<!-- <a-form-model-item label="所属事项" prop="matterId">
<a-select
allowClear
@select="handleSelect"
v-model="form.matterId"
placeholder="请选择所属事项"
>
<a-select-option
v-for="v in matterList"
:key="v.id"
:value="v.matterId"
>{{ v.matterName }}</a-select-option
>
</a-select>
</a-form-model-item> -->
<a-form-model
:model="form"
ref="formData"
:rules="rules"
layout="vertical"
>
<a-form-model-item label="问题" prop="question">
<a-textarea
v-model="form.question"
placeholder="请输入问题"
allow-clear
:auto-size="{
minRows: 4,
maxRows: 6,
}"
/>
</a-form-model-item>
<a-form-model-item label="答案" prop="answer">
......@@ -69,6 +67,10 @@
v-model="form.answer"
placeholder="请输入答案"
allow-clear
:auto-size="{
minRows: 4,
maxRows: 6,
}"
/>
</a-form-model-item>
</a-form-model>
......@@ -106,7 +108,7 @@ const columns = [
},
{
title: "操作",
width: "20%",
width: "15%",
scopedSlots: { customRender: "active" },
},
];
......@@ -121,6 +123,8 @@ export default {
data() {
return {
columns,
loading: false,
pageSizeOptions: ["10", "30", "50", "100"],
tableData: [],
siteId: "",
matterList: [],
......@@ -148,24 +152,12 @@ export default {
},
created() {
this.getMatterquestionData();
// this.getSiteMatterList();
},
methods: {
// 获取站点事项列表
// async getSiteMatterList() {
// this.siteId = this.$route.query.siteId;
// let res = await getSiteMatterList({ siteId: this.siteId });
// this.matterList = res.data.data.data;
// },
// // 事项下拉选择
// handleSelect(val, node) {
// let { text } = node.componentOptions.children[0];
// this.form.matterName = text;
// },
// 获取列表
async getMatterquestionData() {
if (!local.getLocal("matter")) return;
this.loading = true;
let res = await getMatterquestion({
page: this.current,
size: this.size,
......@@ -173,14 +165,12 @@ export default {
matterName: local.getLocal("matter").matterName,
});
let { data, total } = res.data.data;
this.loading = false;
if (!data.length && this.current > 1) {
this.current -= 1;
this.getMatterquestionData();
}
this.total = total;
data.forEach((v) => {
v.key = v.id;
});
this.tableData = data;
},
// 新增
......@@ -199,6 +189,12 @@ export default {
this.current = num;
this.getMatterquestionData();
},
// 改变每页显示数量
showSizeChange(cur, size) {
this.current = cur;
this.size = size;
this.getMatterquestionData();
},
// 保存新增
handleOk() {
if (!local.getLocal("matter")) return;
......@@ -215,8 +211,6 @@ export default {
this.$message.success(msg);
this.$refs.formData.resetFields();
this.getMatterquestionData();
} else {
this.$message.error(msg);
}
}
});
......@@ -231,15 +225,29 @@ export default {
this.$refs.formData.resetFields();
},
// 删除
async handleDel(val) {
let res = await delMatterquestion({ id: val });
let { code, msg } = res.data;
if (code === 1) {
this.$message.success(msg);
this.getMatterquestionData();
} else {
this.$message.error(msg);
}
async handleDel(id) {
let _this = this;
this.$confirm({
title: "系统提示",
content: "删除不可恢复,确定要删除吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
icon: "exclamation-circle",
maskClosable: true,
async onOk() {
let res = await delMatterquestion({ id });
let { code, msg } = res.data;
if (code === 1) {
_this.$message.success(msg);
_this.getMatterquestionData();
}
},
onCancel() {
console.log("Cancel");
},
});
},
// 查看详情
handleMore(data) {
......@@ -273,19 +281,11 @@ export default {
margin: 10px 0;
}
}
/deep/.ant-modal-body {
.ant-input {
height: 200px;
width: 100% !important;
}
}
.table-content {
height: 620px;
}
.answer {
color: #05b2fe;
}
/deep/.ant-form-item-label {
width: auto !important;
/deep/.ant-form-item {
display: block !important;
}
</style>
\ No newline at end of file
......@@ -32,18 +32,18 @@
<a-form-model-item>
<a-button
:disabled="isRates"
@click="handleReset"
style="margin-left: 90px"
type="primary"
@click="onSubmit"
>
确定
重置
</a-button>
<a-button
:disabled="isRates"
@click="handleReset"
style="margin-left: 20px"
type="primary"
@click="onSubmit"
>
重置
确定
</a-button>
</a-form-model-item>
</a-form-model>
......@@ -92,6 +92,7 @@ export default {
this.isRates = false;
} else {
Object.assign(this.formData, this.$options.data().formData);
this.formData.id && this.$delete(this.formData, "id");
this.isRates = true;
}
},
......
......@@ -109,8 +109,8 @@
@cancel="handleClose"
>
<template slot="footer">
<a-button type="primary" @click="handleOk">确定</a-button>
<a-button @click="handleReset">重置</a-button>
<a-button type="primary" @click="handleOk">确定</a-button>
</template>
<a-form-model
ref="ruleForm"
......
......@@ -159,6 +159,11 @@
</div>
<div class="btn-box">
<a-space>
<a-button
:disabled="!formData.skinFieldList.length"
@click="resetForm"
>重置</a-button
>
<a-button
:disabled="!formData.skinFieldList.length"
type="primary"
......@@ -166,11 +171,6 @@
@click="getPrintScreen"
>保存</a-button
>
<a-button
:disabled="!formData.skinFieldList.length"
@click="resetForm"
>重置</a-button
>
</a-space>
</div>
</div>
......
......@@ -5,7 +5,6 @@
title="编辑工作人员"
ok-text="确认"
cancel-text="取消"
@ok="hideModal"
width="820px"
:maskClosable="false"
>
......@@ -38,6 +37,23 @@
<a-col :span="12">
<a-form-model-item label="所属部门" prop="deptId">
<a-select
showSearch
v-model="form.deptId"
optionFilterProp="label"
placeholder="请选择部门"
@change="handleDeptSelect"
allowClear
>
<a-select-option
v-for="v in diptData"
:key="v.id"
:value="v.id"
:label="v.name"
>
{{ v.name }}</a-select-option
>
</a-select>
<!-- <a-select
v-model="form.deptId"
@change="handleDeptSelect"
placeholder="请选择部门"
......@@ -48,11 +64,11 @@
:value="v.id"
>{{ v.name }}</a-select-option
>
</a-select>
</a-select> -->
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="星级">
<a-form-model-item label="星级" prop="starlevel">
<a-select v-model="form.starlevel" placeholder="请选择星级">
<a-select-option :value="5">5星</a-select-option>
<a-select-option :value="4">4星</a-select-option>
......@@ -93,7 +109,7 @@
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="政治面貌">
<a-form-model-item label="政治面貌" prop="politicalstatus">
<a-select
allowClear
v-model="form.politicalstatus"
......@@ -109,7 +125,7 @@
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="称号">
<a-form-model-item label="称号" prop="dangyuan">
<a-select
allowClear
v-model="form.dangyuan"
......@@ -158,11 +174,12 @@
:label-col="{ span: 3 }"
:wrapper-col="{ span: 19 }"
label="个人简介"
prop="summary"
>
<a-input
v-model="form.summary"
<a-textarea
placeholder="请输入个人简介"
type="textarea"
allow-clear
v-model="form.summary"
/>
</a-form-model-item>
</a-col>
......@@ -173,6 +190,7 @@
:label-col="{ span: 4 }"
:wrapper-col="{ span: 19 }"
label="个人照片"
prop="photoPath"
>
<div class="person_image">
<a-upload
......@@ -180,9 +198,10 @@
list-type="picture-card"
class="avatar-uploader"
:show-upload-list="false"
:customRequest="uploadImg"
:before-upload="beforeUpload"
:action="api + 'base/file/commonupload'"
:accept="accept"
@change="handleChange"
>
<img
v-if="form.photoPath"
......@@ -245,8 +264,13 @@
:label-col="{ span: 3 }"
:wrapper-col="{ span: 19 }"
label="办理事项"
prop="business"
>
<a-input v-model="form.business" type="textarea" />
<a-textarea
placeholder="请输入办理事项"
allow-clear
v-model="form.business"
/>
</a-form-model-item>
</a-col>
</a-row>
......@@ -256,8 +280,13 @@
:label-col="{ span: 3 }"
:wrapper-col="{ span: 19 }"
label="岗位职责"
prop="duty"
>
<a-input v-model="form.duty" type="textarea" />
<a-textarea
placeholder="请输入岗位职责"
allow-clear
v-model="form.duty"
/>
</a-form-model-item>
</a-col>
</a-row>
......@@ -267,19 +296,29 @@
:label-col="{ span: 3 }"
:wrapper-col="{ span: 19 }"
label="服务承诺"
prop="promise"
>
<a-input v-model="form.promise" type="textarea" />
<a-textarea
placeholder="请输入服务承诺"
allow-clear
v-model="form.promise"
/>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<!-- 按钮 -->
<div slot="footer">
<a-button @click="handleReset">重置</a-button>
<a-button type="primary" @click="hideModal">确定</a-button>
</div>
</a-modal>
</template>
<script>
import { getWindowList, saveWorkman, uploadFile } from "@/services/dept";
import { getWindowList, saveWorkman } from "@/services/dept";
import { modelList } from "@/services/basicsetFun";
import { changePhone, changeLandline } from "@/utils/validate";
// import { changePhone, changeLandline } from "@/utils/validate";
export default {
props: {
editVisible: {
......@@ -374,10 +413,10 @@ export default {
// windowId: [
// { required: true, message: "窗口不能为空", trigger: "change" },
// ],
mobile: [{ required: false, validator: changePhone, trigger: "blur" }],
phone: [
{ required: false, validator: changeLandline, trigger: "blur" },
],
// mobile: [{ required: false, validator: changePhone, trigger: "blur" }],
// phone: [
// { required: false, validator: changeLandline, trigger: "blur" },
// ],
idCard: [{ required: false, validator: checkIdCard, trigger: "blur" }],
},
windowData: [], // 部门窗口信息
......@@ -435,10 +474,8 @@ export default {
let { code, msg } = res.data;
if (code === 1) {
this.$message.success(msg);
this.$parent.getWorkmanData();
this.$emit("editSuccess");
this.handleClose();
} else {
this.$message.error(msg);
}
}
});
......@@ -453,17 +490,18 @@ export default {
// 关闭对话框
handleClose() {
this.$refs.formData.resetFields();
this.loading = false;
this.Visible = false;
},
// 重置
handleReset() {
this.$refs.formData.resetFields();
},
// 照片上传
async uploadImg(info) {
handleChange({ file }) {
this.loading = true;
const formData = new FormData();
formData.append("file", info.file);
let res = await uploadFile(formData);
let { code, url } = res.data;
if (code === 1) {
this.form.photoPath = url;
if (file.status == "done") {
this.form.photoPath = file.response.url;
this.loading = false;
}
},
......
......@@ -4,8 +4,7 @@
@cancel="handleClose"
title="新增工作人员"
ok-text="确认"
cancel-text="取消"
@ok="hideModal"
cancel-text="重置"
width="820px"
:maskClosable="false"
>
......@@ -38,6 +37,24 @@
<a-col :span="12">
<a-form-model-item label="所属部门" prop="deptId">
<a-select
showSearch
v-model="form.deptId"
optionFilterProp="label"
placeholder="请选择部门"
@change="handleDeptSelect"
allowClear
>
<a-select-option
v-for="v in diptData"
:key="v.id"
:value="v.id"
:label="v.name"
>
{{ v.name }}</a-select-option
>
</a-select>
<!-- <a-select
v-model="form.deptId"
@change="handleDeptSelect"
allowClear
......@@ -49,11 +66,11 @@
:value="v.id"
>{{ v.name }}</a-select-option
>
</a-select>
</a-select> -->
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="星级">
<a-form-model-item label="星级" prop="starlevel">
<a-select
allowClear
v-model="form.starlevel"
......@@ -98,7 +115,7 @@
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="政治面貌">
<a-form-model-item label="政治面貌" prop="politicalstatus">
<a-select
allowClear
v-model="form.politicalstatus"
......@@ -114,7 +131,7 @@
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="称号">
<a-form-model-item label="称号" prop="dangyuan">
<a-select
allowClear
v-model="form.dangyuan"
......@@ -163,11 +180,12 @@
:label-col="{ span: 3 }"
:wrapper-col="{ span: 19 }"
label="个人简介"
prop="summary"
>
<a-input
v-model="form.summary"
<a-textarea
placeholder="请输入个人简介"
type="textarea"
allow-clear
v-model="form.summary"
/>
</a-form-model-item>
</a-col>
......@@ -178,6 +196,7 @@
:label-col="{ span: 4 }"
:wrapper-col="{ span: 19 }"
label="个人照片"
prop="photoPath"
>
<div class="person_image">
<a-upload
......@@ -185,9 +204,11 @@
list-type="picture-card"
class="avatar-uploader"
:show-upload-list="false"
:customRequest="uploadImg"
:before-upload="beforeUpload"
:action="api + 'base/file/commonupload'"
:accept="accept"
@change="handleChange"
:remove="handleRemove"
>
<img
v-if="form.photoPath"
......@@ -293,11 +314,12 @@
:label-col="{ span: 3 }"
:wrapper-col="{ span: 19 }"
label="办理事项"
prop="business"
>
<a-input
v-model="form.business"
<a-textarea
placeholder="请输入办理事项"
type="textarea"
allow-clear
v-model="form.business"
/>
</a-form-model-item>
</a-col>
......@@ -308,11 +330,12 @@
:label-col="{ span: 3 }"
:wrapper-col="{ span: 19 }"
label="岗位职责"
prop="duty"
>
<a-input
v-model="form.duty"
<a-textarea
placeholder="请输入岗位职责"
type="textarea"
allow-clear
v-model="form.duty"
/>
</a-form-model-item>
</a-col>
......@@ -323,24 +346,30 @@
:label-col="{ span: 3 }"
:wrapper-col="{ span: 19 }"
label="服务承诺"
prop="promise"
>
<a-input
v-model="form.promise"
<a-textarea
placeholder="请输入服务承诺"
type="textarea"
allow-clear
v-model="form.promise"
/>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<!-- 按钮 -->
<div slot="footer">
<a-button @click="handleReset">重置</a-button>
<a-button type="primary" @click="hideModal">确定</a-button>
</div>
</a-modal>
</template>
<script>
import { changeAccount, changePassWord } from "@/utils/validate";
import { getWindowList, saveWorkman, uploadFile } from "@/services/dept";
import { getWindowList, saveWorkman } from "@/services/dept";
import { modelList } from "@/services/basicsetFun";
import { changePhone, changeLandline } from "@/utils/validate";
// import { changePhone, changeLandline } from "@/utils/validate";
import local from "@/utils/local";
export default {
props: {
......@@ -444,10 +473,10 @@ export default {
loginPwd: [
{ required: true, validator: changePassWord, trigger: "blur" },
],
mobile: [{ required: false, validator: changePhone, trigger: "blur" }],
phone: [
{ required: false, validator: changeLandline, trigger: "blur" },
],
// mobile: [{ required: false, validator: changePhone, trigger: "blur" }],
// phone: [
// { required: false, validator: changeLandline, trigger: "blur" },
// ],
idCard: [{ required: false, validator: checkIdCard, trigger: "blur" }],
},
windowData: [], // 部门窗口信息
......@@ -502,15 +531,16 @@ export default {
let { code, msg } = res.data;
if (code === 1) {
this.$message.success(msg);
this.$parent.getWorkmanData();
this.$emit("addSuccess");
this.handleClose();
} else {
this.$message.error(msg);
}
}
});
},
// 重置
handleReset() {
this.$refs.formData.resetFields();
},
// 新增
onAdd() {
Object.assign(this.form, this.$options.data().form);
......@@ -524,21 +554,30 @@ export default {
},
// 关闭对话框
handleClose() {
this.Visible = false;
this.$refs.formData.resetFields();
this.loading = false;
this.Visible = false;
},
// 照片上传
async uploadImg(info) {
handleChange({ file }) {
this.loading = true;
const formData = new FormData();
formData.append("file", info.file);
let res = await uploadFile(formData);
let { code, url } = res.data;
if (code === 1) {
this.form.photoPath = url;
if (file.status == "done") {
this.form.photoPath = file.response.url;
this.loading = false;
}
},
handleRemove() {},
// async uploadImg(info) {
// this.loading = true;
// const formData = new FormData();
// formData.append("file", info.file);
// let res = await uploadFile(formData);
// let { code, url } = res.data;
// if (code === 1) {
// this.form.photoPath = url;
// this.loading = false;
// }
// },
// 照片大小格式限制
beforeUpload(file) {
const isJpgOrPng =
......
......@@ -265,6 +265,7 @@
:visibleAll.sync="visibleAll"
:designationDict="designationDict"
:politicalDict="politicalDict"
@addSuccess="getWorkmanData"
></addpersonnel>
<!-- 编辑工作人员 -->
<EditPersonel
......@@ -273,6 +274,7 @@
:designationDict="designationDict"
:politicalDict="politicalDict"
:diptData="deptData"
@editSuccess="getWorkmanData"
></EditPersonel>
<!-- 修改密码 -->
<EditPwd ref="EditPwd" :visibleEditPwd.sync="visibleEditPwd"></EditPwd>
......@@ -537,10 +539,6 @@ export default {
this.size = size;
this.getWorkmanData();
},
// 导入
// handleUpload() {
// this.importFile();
// },
// 批量导入工作人员模板下载
async handleDownload() {
......@@ -558,46 +556,6 @@ export default {
document.body.appendChild(link);
},
//导入文件
// importFile() {
// let that = this;
// let input = document.createElement("input");
// input.setAttribute("type", "file");
// input.setAttribute(
// "accept",
// "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
// );
// input.style.display = "none";
// input.addEventListener("change", () => {
// if (input.files && input.files.length > 0) {
// that.uploadFile(input.files[0]);
// }
// });
// document.body.appendChild(input);
// input.click();
// document.body.removeChild(input);
// },
//上传文件
// async uploadFile(file) {
// let formData = new FormData();
// formData.append("file", file);
// formData.append("siteId", this.siteId);
// formData.append("deptId", this.deptSearch);
// formData.append("windowId", this.windowSearch);
// let config = {
// headers: {
// "Content-Type": "multipart/form-data",
// },
// };
// let res = await importData(formData, config);
// let { code, msg } = res.data;
// if (code === 1) {
// this.$message.success(msg);
// this.page = 1;
// this.getWorkmanData();
// }
// },
// 批量上传工作人员
handleChange({ file }) {
this.spinning = true;
......@@ -613,32 +571,6 @@ export default {
}
},
// 批量导入照片
// handleUploadImg() {
// let input = document.createElement("input");
// input.setAttribute("type", "file");
// input.setAttribute("accept", "application/x-zip-compressed");
// input.style.display = "none";
// input.addEventListener("change", async () => {
// if (input.files && input.files.length > 0) {
// let file = input.files[0];
// let formData = new FormData();
// formData.append("file", file);
// let res = await uploadFile(formData);
// if (res.data.code == 1) {
// let result = await uploadAllImg({
// filePath: res.data.url,
// });
// if (result.data.code === 1) {
// this.$message.success(result.data.msg);
// }
// }
// }
// });
// document.body.appendChild(input);
// input.click();
// document.body.removeChild(input);
// },
// 批量导入照片
async handleChangeImg({ file }) {
this.spinning = true;
if (file.status === "done") {
......
......@@ -137,6 +137,14 @@ export async function delMattersetbase(data) {
export async function addMatterintermediary(data) {
return request(matterintermediary.save, METHOD.POST, data);
}
// 中介服务列表
export async function getMatterintermediaryList(data) {
return request(matterintermediary.list, METHOD.POST, data);
}
// 删除
export async function delMatterintermediary(data) {
return request(matterintermediary.delete, METHOD.GET, data);
}
/**
* 办理流程
......
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