<template>
|
<div class="createmyInterface">
|
<main>
|
<div class="mainContent">
|
<el-form ref="user" label-width="140px" autoComplete="on" :model="myInterface"
|
:rules="createmyInterfaceRules" label-position="right">
|
<!-- 应用名称 -->
|
<el-form-item label="任务编号:" prop="applicationName">
|
<el-input v-model="myInterface.taskNumber" placeholder="填写任务编号"></el-input>
|
</el-form-item>
|
<!-- 应用图标 -->
|
<el-form-item label="案件编号:" prop="applicationIconUrl">
|
<el-input v-model="myInterface.caseNumber" placeholder="填写案件编号"></el-input>
|
</el-form-item>
|
<!-- 应用图标 -->
|
<el-form-item label="大类:" prop="applicationIconUrl">
|
<el-input v-model="myInterface.bigType" placeholder="填写案件编号"></el-input>
|
</el-form-item>
|
<!-- 应用图标 -->
|
<el-form-item label="小类:" prop="applicationIconUrl">
|
<el-input v-model="myInterface.smallType" placeholder="填写案件编号"></el-input>
|
</el-form-item>
|
<!-- 应用类型 -->
|
<el-form-item label="问题类型:" prop="applicationType">
|
<el-input v-model="myInterface.questionType" placeholder="填写问题类型"></el-input>
|
</el-form-item>
|
<!-- 应用名称 -->
|
<el-form-item label="街道:" prop="applicationName">
|
<el-input v-model="myInterface.steert" placeholder="填写街道"></el-input>
|
</el-form-item>
|
<!-- 应用图标 -->
|
<el-form-item label="社区:" prop="applicationIconUrl">
|
<el-input v-model="myInterface.community" placeholder="填写社区"></el-input>
|
</el-form-item>
|
<!-- 应用类型 -->
|
<el-form-item label="监督员:" prop="applicationType">
|
<el-input v-model="myInterface.applicationName" placeholder="填写监督员"></el-input>
|
</el-form-item>
|
<!-- 应用图标 -->
|
<el-form-item label="问题描述:" prop="applicationIconUrl">
|
<el-input v-model="myInterface.description" placeholder="填写问题描述"></el-input>
|
</el-form-item>
|
<!-- 应用类型 -->
|
<el-form-item label="上报时间:" prop="applicationType">
|
<el-input v-model="myInterface.applicationName" placeholder="填写上报时间"></el-input>
|
</el-form-item>
|
<el-form-item label="状态:" prop="applicationType">
|
<el-input v-model="myInterface.status" placeholder="填写状态"></el-input>
|
</el-form-item>
|
<!-- 按钮 -->
|
<!-- <el-form-item>
|
<div class="optionBtn">
|
<el-button type="primary" class="btn submit" @click.native.prevent="handleUser">提交
|
</el-button>
|
<el-button class="btn reset">重置</el-button>
|
</div>
|
</el-form-item> -->
|
</el-form>
|
</div>
|
</main>
|
</div>
|
</template>
|
<script>
|
export default {
|
data() {
|
const validateApplicationName = (rule, value, callback) => {
|
if (!value) {
|
callback(new Error("请填写用户名称"));
|
}
|
};
|
const validateApplicationIconUrl = (rule, value, callback) => {
|
if (!value) {
|
callback(new Error("请填写登录密码"));
|
} else {
|
const rep = /^\w+$/;
|
if (!rep.test(value)) {
|
callback(new Error("密码只能是以数字、26个英文字母或者下划线组成的字符串"));
|
}
|
}
|
};
|
const validateApplicationType = (rule, value, callback) => {
|
if (!value) {
|
callback(new Error("请填写用户姓名"));
|
} else {
|
const rep = /^[\u4E00-\u9FA5]{2,4}$/;
|
if (!rep.test(value)) {
|
callback("请输入正确的用户姓名");
|
}
|
}
|
};
|
const validatePhone = (rule, value, callback) => {
|
if (!value) {
|
callback(new Error("请填写手机号码"));
|
} else {
|
const rep = /(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/
|
if (!rep.test(value)) {
|
callback("请输入正确的手机号码");
|
}
|
}
|
};
|
return {
|
myInterface:{
|
taskNumber:"13413414",
|
caseNumber:"202233112310310001",
|
questionType:"违规",
|
bigType:"不按规定停放影响其他车辆和行人通行但未造成交通事故",
|
smallType:"违反国家有关标准编制城乡规划",
|
steert:"妙峰街",
|
community:"大柘镇",
|
description:"违规停放",
|
reportTime:"2022-11-1 12:10:10",
|
status:"上报"
|
},
|
createmyInterfaceRules: {
|
applicationName: [
|
{ required: true, trigger: "blur", validator: validateApplicationName},
|
],
|
applicationIconUrl: [
|
{ required: true, trigger: "blur", validator: validateApplicationIconUrl },
|
],
|
applicationType: [
|
{ required: true, trigger: "blur", validator: validateApplicationType },
|
],
|
websiteUrl: [
|
{ required: true, trigger: "blur" },
|
],
|
description: [
|
{ required: false, trigger: "blur" },
|
],
|
},
|
}
|
},
|
created() {
|
const that = this;
|
const {userInfo} = this;
|
// this.myInterface = JSON.parse(JSON.stringify(userInfo));
|
},
|
methods: {
|
},
|
props: ['updateFlag','userInfo']
|
}
|
</script>
|
<style lang="scss" scoped>
|
.createmyInterface {
|
border-radius: 1px;
|
// background-color: #09152f;
|
|
main {
|
text-align: left;
|
padding: 0 55px;
|
// background-color: #09152f;
|
|
.mainContent {
|
display: flex;
|
justify-content: center;
|
padding-top: 50px;
|
|
.iconBox {
|
display: flex;
|
|
.upload {
|
display: flex;
|
align-items: flex-end;
|
|
img {
|
width: 120px;
|
height: 120px;
|
border-radius: 4px;
|
}
|
}
|
|
.iconView {
|
display: flex;
|
flex-direction: column;
|
margin-left: 30px;
|
justify-content: flex-end;
|
|
img {
|
width: 70px;
|
height: 70px;
|
border-radius: 4px;
|
}
|
}
|
|
.tip {
|
display: flex;
|
align-items: flex-end;
|
margin-left: 30px;
|
font-size: 12px;
|
|
span {
|
line-height: 20px;
|
}
|
}
|
}
|
.optionBtn{
|
&::v-deep .el-button{
|
padding: 12px 40px;
|
}
|
.reset{
|
border: 1px solid #0079fe;
|
color: #0079fe;
|
}
|
}
|
// &::v-deep .el-form-item__label {
|
// color: #4b9bb7;
|
// }
|
|
// &::v-deep .el-input__inner {
|
// background-color: #09152f;
|
// border: 1px solid #17324c;
|
// }
|
|
.addPerson {
|
display: flex;
|
list-style: none;
|
padding: 0;
|
|
li {
|
background-color: #cccccc;
|
width: 36px;
|
height: 36px;
|
border-radius: 50%;
|
color: #fff;
|
text-align: center;
|
font-size: 30px;
|
margin-left: 10px;
|
}
|
}
|
|
.el-form-item__content {
|
width: 400px;
|
|
.el-select {
|
width: 100%;
|
}
|
}
|
|
.optionHandleSp {
|
display: flex;
|
|
.areaNumber,
|
.moreNumber {
|
flex: 1;
|
}
|
|
.telNumber {
|
flex: 2;
|
}
|
}
|
|
}
|
}
|
|
footer {
|
border-top: 1px solid #fff;
|
height: 80px;
|
display: flex;
|
align-items: center;
|
justify-content: flex-end;
|
padding-right: 20px;
|
}
|
}
|
</style>
|