master
xy 3 years ago
parent 5b3cd3f923
commit edec6334c1

@ -7,13 +7,13 @@
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title> <title><%= webpackConfig.name %></title>
<script> <!-- <script>-->
window._AMapSecurityConfig = { <!-- window._AMapSecurityConfig = {-->
securityJsCode: '0d59d0a3fa5483849b52b0edc4bc97ec', <!-- securityJsCode: '0d59d0a3fa5483849b52b0edc4bc97ec',-->
} <!-- }-->
</script> <!-- </script>-->
<script type="text/javascript" src='https://webapi.amap.com/maps?v=1.4.11&key=795a757114c371f42cee1f8efa527684&plugin=AMap.PlaceSearch'></script> <!-- <script type="text/javascript" src='https://webapi.amap.com/maps?v=1.4.11&key=795a757114c371f42cee1f8efa527684&plugin=AMap.PlaceSearch'></script>-->
<script src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script> <!-- <script src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>-->
</head> </head>
<body> <body>
<noscript> <noscript>

@ -5,7 +5,8 @@ import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style import 'nprogress/nprogress.css' // progress bar style
import {getToken, setToken} from '@/utils/auth' // get token from cookie import {getToken, setToken} from '@/utils/auth' // get token from cookie
import getPageTitle from '@/utils/get-page-title' import getPageTitle from '@/utils/get-page-title'
import { login } from "@/api/reception/index" import { login } from "@/api/reception/index";
import axios from "axios";
NProgress.configure({ showSpinner: false }) // NProgress Configuration NProgress.configure({ showSpinner: false }) // NProgress Configuration

@ -54,110 +54,118 @@ export default {
(() => { (() => {
let dom = []; let dom = [];
this.formInfo.filter(i => i.form_show).forEach((i, index) => { this.formInfo.filter(i => i.form_show).forEach((i, index) => {
dom.push( if (
h( !/\/manage\/rule/.test(this.$route.fullPath) &&
"el-form-item", !!["nianfen", "bianhao", "wenjian"].find(
{ (j) => j === i.field
ref: `elFormItem${i.field}`, )
style: { ) {
width: "100%", } else {
}, dom.push(
props: { h(
label: i.name, "el-form-item",
prop: i.field, {
required: ref: `elFormItem${i.field}`,
i.validation instanceof Array style: {
? !!i.validation.find((i) => i === "required") width: "100%",
: false, },
props: {
label: i.name,
prop: i.field,
required:
i.validation instanceof Array
? !!i.validation.find((i) => i === "required")
: false,
},
}, },
}, this.$scopedSlots[i.field]
this.$scopedSlots[i.field] ? this.$scopedSlots[i.field]({ fieldInfo: i, form: this.form, file: this.file })
? this.$scopedSlots[i.field]({ fieldInfo: i, form: this.form, file: this.file }) : [
: [ h(
h( domMap.get(i.edit_input),
domMap.get(i.edit_input), {
{ ref: `elEdit_${i.field}`,
ref: `elEdit_${i.field}`, style: {
style: { width: "100%",
width: "100%",
},
props: {
...addPropsMap.get(i.edit_input),
...this.extraProps(i),
placeholder: i.help,
value: this.form[i.field],
},
attrs: {
placeholder: i.help || `请填写${i.name}`,
},
on: {
[this.getEventType(i.edit_input)]: (e) => {
if (i.field) {
this.form[i.field] = e;
this.form = Object.assign({}, this.form);
}
}, },
}, props: {
scopedSlots: ...addPropsMap.get(i.edit_input),
i.edit_input === "file" || ...this.extraProps(i),
i.edit_input === "files" placeholder: i.help,
? { value: this.form[i.field],
file: (scope) => { },
let { file } = scope; attrs: {
return [ placeholder: i.help || `请填写${i.name}`,
h("div", {}, [ },
h("i", { on: {
class: { [this.getEventType(i.edit_input)]: (e) => {
"el-icon-circle-check": if (i.field) {
file.status === "success", this.form[i.field] = e;
"el-icon-loading": this.form = Object.assign({}, this.form);
file.status === "uploading", }
}, },
style: { },
color: scopedSlots:
file.status === "success" i.edit_input === "file" ||
? "green" i.edit_input === "files"
: "", ? {
}, file: (scope) => {
}), let { file } = scope;
h( return [
"a", h("div", {}, [
{ h("i", {
attrs: {
href: file.url,
download: file.name,
},
class: { class: {
"uploaded-a": "el-icon-circle-check":
file.status === "success", file.status === "success",
"el-icon-loading":
file.status === "uploading",
}, },
style: { style: {
'padding': '0 4px' color:
file.status === "success"
? "green"
: "",
},
}),
h(
"a",
{
attrs: {
href: file.url,
download: file.name,
},
class: {
"uploaded-a":
file.status === "success",
},
style: {
'padding': '0 4px'
},
}, },
file.name
),
]),
h("i", {
class: "el-icon-close",
on: {
["click"]: () =>
this.fileRemoveHandler(
file,
i.field
),
}, },
file.name }),
), ];
]), },
h("i", { }
class: "el-icon-close", : "",
on: { },
["click"]: () => this.optionsRender(h, i)
this.fileRemoveHandler( ),
file, ]
i.field )
), );
}, }
}),
];
},
}
: "",
},
this.optionsRender(h, i)
),
]
)
);
}); });
return dom; return dom;
})() })()

Loading…
Cancel
Save