作者 lihongjuan

1

正在显示 81 个修改的文件 包含 4296 行增加0 行删除

要显示太多修改。

为保证性能只显示 81 of 81+ 个文件。

{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-vue-jsx", "transform-runtime"]
}
... ...
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
... ...
.DS_Store
node_modules/
/dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
... ...
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}
... ...
# migrate
> A Vue.js project
## Build Setup
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
```
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
... ...
'use strict'
require('./check-versions')()
process.env.NODE_ENV = 'production'
const ora = require('ora')
const rm = require('rimraf')
const path = require('path')
const chalk = require('chalk')
const webpack = require('webpack')
const config = require('../config')
const webpackConfig = require('./webpack.prod.conf')
const spinner = ora('building for production...')
spinner.start()
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, (err, stats) => {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
chunks: false,
chunkModules: false
}) + '\n\n')
if (stats.hasErrors()) {
console.log(chalk.red(' Build failed with errors.\n'))
process.exit(1)
}
console.log(chalk.cyan(' Build complete.\n'))
console.log(chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
))
})
})
... ...
'use strict'
const chalk = require('chalk')
const semver = require('semver')
const packageConfig = require('../package.json')
const shell = require('shelljs')
function exec (cmd) {
return require('child_process').execSync(cmd).toString().trim()
}
const versionRequirements = [
{
name: 'node',
currentVersion: semver.clean(process.version),
versionRequirement: packageConfig.engines.node
}
]
if (shell.which('npm')) {
versionRequirements.push({
name: 'npm',
currentVersion: exec('npm --version'),
versionRequirement: packageConfig.engines.npm
})
}
module.exports = function () {
const warnings = []
for (let i = 0; i < versionRequirements.length; i++) {
const mod = versionRequirements[i]
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(mod.name + ': ' +
chalk.red(mod.currentVersion) + ' should be ' +
chalk.green(mod.versionRequirement)
)
}
}
if (warnings.length) {
console.log('')
console.log(chalk.yellow('To use this template, you must update following to modules:'))
console.log()
for (let i = 0; i < warnings.length; i++) {
const warning = warnings[i]
console.log(' ' + warning)
}
console.log()
process.exit(1)
}
}
... ...
'use strict'
const path = require('path')
const config = require('../config')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const packageConfig = require('../package.json')
exports.assetsPath = function (_path) {
const assetsSubDirectory = process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory
: config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path)
}
exports.cssLoaders = function (options) {
options = options || {}
const cssLoader = {
loader: 'css-loader',
options: {
sourceMap: options.sourceMap
}
}
const postcssLoader = {
loader: 'postcss-loader',
options: {
sourceMap: options.sourceMap
}
}
// generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) {
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
if (loader) {
loaders.push({
loader: loader + '-loader',
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
})
}
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader'
})
} else {
return ['vue-style-loader'].concat(loaders)
}
}
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders('less'),
sass: generateLoaders('sass', { indentedSyntax: true }),
scss: generateLoaders('sass'),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}
}
// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function (options) {
const output = []
const loaders = exports.cssLoaders(options)
for (const extension in loaders) {
const loader = loaders[extension]
output.push({
test: new RegExp('\\.' + extension + '$'),
use: loader
})
}
return output
}
exports.createNotifierCallback = () => {
const notifier = require('node-notifier')
return (severity, errors) => {
if (severity !== 'error') return
const error = errors[0]
const filename = error.file && error.file.split('!').pop()
notifier.notify({
title: packageConfig.name,
message: severity + ': ' + error.name,
subtitle: filename || '',
icon: path.join(__dirname, 'logo.png')
})
}
}
... ...
'use strict'
const utils = require('./utils')
const config = require('../config')
const isProduction = process.env.NODE_ENV === 'production'
const sourceMapEnabled = isProduction
? config.build.productionSourceMap
: config.dev.cssSourceMap
module.exports = {
loaders: utils.cssLoaders({
sourceMap: sourceMapEnabled,
extract: isProduction
}),
cssSourceMap: sourceMapEnabled,
cacheBusting: config.dev.cacheBusting,
transformToRequire: {
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: 'xlink:href'
}
}
... ...
'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const vueLoaderConfig = require('./vue-loader.conf')
function resolve(dir) {
return path.join(__dirname, '..', dir)
}
module.exports = {
context: path.resolve(__dirname, '../'),
entry: {
app: './src/main.js'
},
output: {
path: config.build.assetsRoot,
filename: '[name].js',
publicPath: process.env.NODE_ENV === 'production' ?
config.build.assetsPublicPath : config.dev.assetsPublicPath
},
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
}
},
module: {
rules: [{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig
},
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('media/[name].[hash:7].[ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
},
]
},
node: {
// prevent webpack from injecting useless setImmediate polyfill because Vue
// source contains it (although only uses it if it's native).
setImmediate: false,
// prevent webpack from injecting mocks to Node native modules
// that does not make sense for the client
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty'
}
}
\ No newline at end of file
... ...
'use strict'
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const path = require('path')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const portfinder = require('portfinder')
const HOST = process.env.HOST
const PORT = process.env.PORT && Number(process.env.PORT)
const devWebpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
},
// cheap-module-eval-source-map is faster for development
devtool: config.dev.devtool,
// these devServer options should be customized in /config/index.js
devServer: {
clientLogLevel: 'warning',
historyApiFallback: {
rewrites: [
{ from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
],
},
hot: true,
contentBase: false, // since we use CopyWebpackPlugin.
compress: true,
host: HOST || config.dev.host,
port: PORT || config.dev.port,
open: config.dev.autoOpenBrowser,
overlay: config.dev.errorOverlay
? { warnings: false, errors: true }
: false,
publicPath: config.dev.assetsPublicPath,
proxy: config.dev.proxyTable,
quiet: true, // necessary for FriendlyErrorsPlugin
watchOptions: {
poll: config.dev.poll,
}
},
plugins: [
new webpack.DefinePlugin({
'process.env': require('../config/dev.env')
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
new webpack.NoEmitOnErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
module.exports = new Promise((resolve, reject) => {
portfinder.basePort = process.env.PORT || config.dev.port
portfinder.getPort((err, port) => {
if (err) {
reject(err)
} else {
// publish the new Port, necessary for e2e tests
process.env.PORT = port
// add port to devServer config
devWebpackConfig.devServer.port = port
// Add FriendlyErrorsPlugin
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
compilationSuccessInfo: {
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
},
onErrors: config.dev.notifyOnErrors
? utils.createNotifierCallback()
: undefined
}))
resolve(devWebpackConfig)
}
})
})
... ...
'use strict'
const path = require('path')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const env = require('../config/prod.env')
const webpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: true,
usePostCSS: true
})
},
devtool: config.build.productionSourceMap ? config.build.devtool : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false
}
},
sourceMap: config.build.productionSourceMap,
parallel: true
}),
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsPath('css/[name].[contenthash].css'),
// Setting the following option to `false` will not extract CSS from codesplit chunks.
// Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
// It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
// increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
allChunks: true,
}),
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSPlugin({
cssProcessorOptions: config.build.productionSourceMap
? { safe: true, map: { inline: false } }
: { safe: true }
}),
// generate dist index.html with correct asset hash for caching.
// you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: config.build.index,
template: 'index.html',
inject: true,
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: true
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
},
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
chunksSortMode: 'dependency'
}),
// keep module.id stable when vendor modules does not change
new webpack.HashedModuleIdsPlugin(),
// enable scope hoisting
new webpack.optimize.ModuleConcatenationPlugin(),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks (module) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
/\.js$/.test(module.resource) &&
module.resource.indexOf(
path.join(__dirname, '../node_modules')
) === 0
)
}
}),
// extract webpack runtime and module manifest to its own file in order to
// prevent vendor hash from being updated whenever app bundle is updated
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
minChunks: Infinity
}),
// This instance extracts shared chunks from code splitted chunks and bundles them
// in a separate chunk, similar to the vendor chunk
// see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
new webpack.optimize.CommonsChunkPlugin({
name: 'app',
async: 'vendor-async',
children: true,
minChunks: 3
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.build.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
if (config.build.productionGzip) {
const CompressionWebpackPlugin = require('compression-webpack-plugin')
webpackConfig.plugins.push(
new CompressionWebpackPlugin({
asset: '[path].gz[query]',
algorithm: 'gzip',
test: new RegExp(
'\\.(' +
config.build.productionGzipExtensions.join('|') +
')$'
),
threshold: 10240,
minRatio: 0.8
})
)
}
if (config.build.bundleAnalyzerReport) {
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
webpackConfig.plugins.push(new BundleAnalyzerPlugin())
}
module.exports = webpackConfig
... ...
'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})
... ...
'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map',
// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true,
cssSourceMap: true
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
/**
* Source Maps
*/
productionSourceMap: true,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
}
\ No newline at end of file
... ...
'use strict'
module.exports = {
NODE_ENV: '"production"'
}
... ...
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>migrate</title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
... ...
此 diff 太大无法显示。
{
"name": "migrate",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "王军 <wj@bronet.cn>",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"build": "node build/build.js"
},
"dependencies": {
"axios": "^0.19.0",
"element-ui": "^2.13.0",
"vue": "^2.5.2",
"vue-router": "^3.0.1"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"node-notifier": "^5.1.2",
"node-sass": "^4.13.0",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8",
"postcss-url": "^7.2.1",
"rimraf": "^2.6.0",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^0.5.8",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
... ...
<template>
<div id="app">
<!-- <img src="./assets/logo.png"> -->
<router-view />
</div>
</template>
<script>
export default {
name: "App"
};
</script>
<style>
#app {
font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
}
body,
html,
ol,
ul,
h1,
h2,
h3,
h4,
h5,
h6,
p,
th,
td,
dl,
dd,
form,
fieldset,
legend,
input,
textarea,
select,
label {
margin: 0;
padding: 0;
cursor: pointer;
}
html,
body {
font: 12px "微软雅黑", "Arial", HELVETICA;
background: #fff;
-webkit-text-size-adjust: 100%;
font-family: "微软雅黑";
overflow: auto;
}
a {
color: #0d1e2e;
text-decoration: none;
font-weight: normal;
}
em {
font-style: normal;
}
li {
list-style: none;
font-weight: normal;
}
img {
width: 100%;
height: 100%;
display: block;
border: 0;
vertical-align: middle;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
p {
word-wrap: break-word;
font-weight: normal;
cursor: pointer;
}
i {
font-style: normal;
}
input {
outline: none;
/* border-radius: 3px;
height: 32px;
font-size: 14px;
border: 1px solid #eee;
padding-left: 14px; */
}
/* 清浮动 */
.clearfix::after {
content: ".";
clear: both;
display: block;
overflow: hidden;
font-size: 0;
height: 0;
}
.clearfix {
zoom: 1;
}
/* flex布局 */
.layout {
display: -moz-box;
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}
/* align-item */
.align_center {
-moz-box-align: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
-moz-box-pack: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
}
.align_left {
-moz-box-align: flex-start;
-webkit-box-align: flex-start;
-ms-flex-align: flex-start;
-webkit-align-items: flex-start;
align-items: flex-start;
-moz-box-pack: flex-start;
-webkit-box-pack: flex-start;
-ms-flex-pack: flex-start;
}
.align_end{
align-items: flex-end;
-moz-box-align: flex-end;
-webkit-box-align: flex-end;
-ms-flex-align: flex-end;
-webkit-align-items: flex-end;
-moz-box-pack: flex-end;
-webkit-box-pack: flex-end;
-ms-flex-pack: flex-end;
}
/* justify */
.justify {
-webkit-justify-content: space-between;
justify-content: space-between;
-moz-box-pack: space-between;
-webkit-box-pack: space-between;
box-pack: space-between;
}
.justify_around {
-webkit-justify-content: space-around;
justify-content: space-around;
-moz-box-pack: space-around;
-webkit-box-pack: space-around;
box-pack: space-around;
}
.justify_center {
justify-content: center;
-webkit-justify-content: center;
-moz-box-pack: center;
-webkit-box-pack: center;
box-pack: center;
}
.justify_end {
justify-content: flex-end;
-webkit-justify-content: flex-end;
-moz-box-pack: flex-end;
-webkit-box-pack: flex-end;
box-pack: flex-end;
}
.justify_start{
justify-content: flex-start;
-webkit-justify-content: flex-start;
-moz-box-pack: flex-start;
-webkit-box-pack: flex-start;
box-pack: flex-start;
}
/* flex-direction */
.flex_diection {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-moz-box-orient: vertical;
-moz-box-direction: normal;
flex-direction: column;
-webkit-flex-direction: column;
}
.flex_row {
flex-direction: row;
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
-o-flex-direction: row;
}
.flex-wrap {
flex-wrap: wrap;
-webkit-flex-wrap: wrap;
-webkit-box-lines: multiple;
-moz-flex-wrap: wrap;
}
/* 下拉选框 */
.el-input__inner {
border-color: #999!important;
border-radius: 3px!important;
color: #666!important
}
.el-input__inner:hover{
border-color: #526AA6!important
}
.el-input__inner::placeholder {
color: #999!important;
}
.el-select .el-input.is-focus .el-input__inner{
border-color: #526AA6!important
}
.el-select .el-input__inner:hover{
border-color: #526AA6!important
}
.el-select .el-input__inner:focus{
border-color: #526AA6!important
}
.el-select-dropdown__item.selected{
color: #666!important
}
/* select右侧箭头 */
.el-input__suffix-inner .el-icon-arrow-up:before {
content: "\E78F";
font-size: 18px;
}
/* 表头 */
.el-table th > .cell {
font-weight: normal;
}
.el-table thead th {
background-color: #c8c8c8 !important;
}
.el-table th {
padding: 0;
}
.el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap>.el-form-item__label:before, .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label:before{
display: none!important
}
/* 验证错误提示 */
.el-form-item__error{
text-align: center
}
</style>
... ...
import Vue from "vue";
import router from "@/router";
import Router from '@/router/index'
import axios from "axios";
import qs from "qs";
import { Notification, Loading, Message } from "element-ui";
// var instance = axios.create({
// baseURL:'',
// timeout:5000,
// headers:{"Content-Type":"multipart/form-data"}
// });
//
// Vue.prototype.instance=instance;
//样式文件,需单独引入
import "element-ui/lib/theme-chalk/index.css";
Vue.prototype.$http = axios;
Vue.prototype.$notify = Notification;
Vue.prototype.$loading = Loading;
Vue.prototype.$message = Message;
Vue.prototype.$qs = qs;
let LoadingInstance,
token = "";
// 环境设置
// 环境的切换
if (process.env.NODE_ENV == "development") {
axios.defaults.baseURL = "http://yiminadmin.zishike.cn";
} else if (process.env.NODE_ENV == "debug") {
axios.defaults.baseURL = "http://yiminadmin.zishike.cn";
} else if (process.env.NODE_ENV == "production") {
axios.defaults.baseURL = "http://yiminadmin.zishike.cn";
}
// http://yiminadmin.zishike.com/
// if (process.env.NODE_ENV == "development") {
// axios.defaults.baseURL = "http://yiminadmin.zishike.com";
// } else if (process.env.NODE_ENV == "debug") {
// axios.defaults.baseURL = "http://yiminadmin.zishike.com";
// } else if (process.env.NODE_ENV == "production") {
// axios.defaults.baseURL = "http://yiminadmin.zishike.com";
// }
// post请求头
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
// axios.defaults.headers.common['token'] = localStorage.getItem("token");
// 设置请求超时
axios.defaults.timeout = 10000;
// 请求拦截器
axios.interceptors.request.use(
config => {
const token = localStorage.getItem("token");
// config.headers = {
// 'Content-Type': 'application/x-www-form-urlencoded',
// };
// if (localStorage.getItem("token")) {
// config.params = { 'token': localStorage.getItem("token") }
// }
// 需要和后台沟通
token && (config.headers.token = token);
return config;
},
error => {
return Promise.reject(error);
}
);
// 响应拦截器
axios.interceptors.response.use(
response => {
LoadingInstance.close();
// 如果返回的状态码为1,说明接口请求成功,可以正常拿到数据
// 否则的话抛出错误
if (response.data.code == 1) {
return Promise.resolve(response);
} else {
switch (response.data.code) {
case 0:
Notification.info({
title: "提示",
message: response.data.msg,
duration: 1500
});
Router.push({
path: "/login"
});
break;
case 401: //未登录
console.log(401)
Notification.error({
title: "错误",
message: response.data.msg,
duration: 1500
});
// console.log(401, 1)
// let test1 = localStorage.getItem("schoolSymbol");
// localStorage.clear();
// Router.push({
// path: "/login/" + test1
// });
break;
case 500:
Notification.error({
title: "错误",
message: response.data.msg,
duration: 1500
});
default:
Notification.error({
title: "错误",
message: response.data.msg,
duration: 1500
});
}
return Promise.reject(response);
}
},
error => {
LoadingInstance.close();
// console.log(error.response.status)
// let test2 = localStorage.getItem("schoolSymbol");
// Router.push({
// path: "/login/" + test2
// });
if (error.response.status) {
Notification.error({
title: "错误",
message: "网络错误",
duration: 1500
});
return Promise.reject(error.response);
}
}
);
/**
* get方法,对应get请求
* @param {String} url [请求的url地址]
* @param {Object} params [请求时携带的参数]
*/
export function get(url, params, loading) {
//console.log(loading);
// headers? axios.defaults.headers.get['XX-Token'] = headers['XX-Token']:"";
if (
loading == "" ||
loading == undefined ||
typeof loading == undefined ||
loading
) {
LoadingInstance = Loading.service({
//加载loading
fullscreen: true,
lock: true,
// spinner: 'el-icon-loading',
text: "加载中...",
background: "rgba(0, 0, 0, 0)"
});
}
return new Promise((resolve, reject) => {
axios
.get(url, {
params: params
})
.then(res => {
resolve(res.data.data);
})
.catch(err => {
reject(err.data);
});
});
}
/**
* post方法,对应post请求
* @param {String} url [请求的url地址]
* @param {Object} params [请求时携带的参数]
**/
export function post(url, params, loading) {
if (loading != false) {
LoadingInstance = Loading.service({
fullscreen: true,
lock: true,
text: "加载中...",
background: "rgba(0, 0, 0, 0)"
});
}
return new Promise((resolve, reject) => {
let that = this;
axios
.post(url, qs.stringify(Object.assign({}, params)))
.then(res => {
resolve(res.data.data);
})
.catch(err => {
reject(err.data);
});
});
}
export function uploadFile(Url, data) {
//上传图片的方法
return new Promise((resolve, reject) => {
let instance = axios.create({
// http://cp.zgcareer.com
baseURL: "http://cp.zgcareer.com",
headers: {
"Content-Type": "multipart/form-data"
}
});
instance
.post(Url, data)
.then(res => {
resolve(res.data.data);
})
.catch(error => {
reject(error.data);
});
});
}
export function toast(message, type) {
//上传图片的方法
if (type == "error") {
Notification.error({
title: "错误",
message: message,
duration: 1500
});
} else {
Notification.success({
title: "提示",
message: message,
duration: 1500
});
}
}
\ No newline at end of file
... ...
<template>
<div class="bottom">
<div class="bot_wrap">
Copyright © 2016.Company name All rights reserved.
</div>
</div>
</template>
<script>
export default {
data(){
return{
}
},
methods:{},
}
</script>
<style scoped>
.bottom{
border-top: 1px solid #999;
height: 40px;
background-color: #fff;
}
.bot_wrap{
width: 1200px;
margin: 0 auto;
line-height: 40px;
color: #666;
font-size: 16px;
text-align: center
}
</style>
\ No newline at end of file
... ...
<template>
<div>
<div class="page" >
<div class="pagelist">
<span class="jump first_page" @click="firstPage">首页</span>
<span class="jump" @click="prev">上一页</span>
<span v-show="current_page>5" class="jump" @click="jumpPage(1)">1</span>
<span class="ellipsis" v-show="efont">...</span>
<span
class="jump"
v-for="num in indexs"
:class="{bgprimary:current_page==num}"
@click="jumpPage(num)"
>{{num}}</span>
<span class="ellipsis" v-show="efont&&current_page<pages-4">...</span>
<span class="jump last_color" @click="next">下一页</span>
<span class="jump last_page last_color" @click="lastPage">尾页</span>
</div>
</div>
</div>
</template>
<script type="text/javascript" src="http://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
<script>
export default {
props:["allPages"],
data() {
return {
current_page: 1, //当前页
pages: "", //总页数
changePage: "", //跳转页
nowIndex: 0
};
},
computed: {
// show: function() {
// return this.pages && this.pages != 1;
// },
efont: function() {
if (this.pages <= 7) return false;
return this.current_page > 5;
},
indexs: function() {
var left = 1,
right = this.pages,
ar = [];
if (this.pages >= 5) {
if (this.current_page > 4 && this.current_page < this.pages - 3) {
left = Number(this.current_page) - 3;
right = Number(this.current_page) + 3;
} else {
if (this.current_page <= 4) {
left = 1;
right = 5;
} else {
right = this.pages;
left = this.pages - 6;
}
}
}
while (left <= right) {
ar.push(left);
left++;
}
return ar;
}
},
methods: {
// 首页
firstPage: function() {
this.current_page = 1;
this.$emit("getPage",this.current_page)
},
// 尾页
lastPage: function() {
this.current_page = this.pages;
this.$emit("getPage",this.current_page)
},
// 上一页
prev: function() {
if (this.current_page == 1) {
this.current_page = 1;
} else {
this.current_page--;
}
this.$emit("getPage",this.current_page)
},
// 下一页
next: function() {
if(this.current_page == this.allPages){
return false
}else{
this.current_page++;
}
this.$emit("getPage",this.current_page)
},
jumpPage: function(id) {
this.current_page = id;
this.$emit("getPage",this.current_page);
}
},
mounted(){
// 从父组件得到的总页数
this.pages = this.allPages
},
};
</script>
<style scoped>
.page {
height: 40px;
text-align: right;
color: #999;
margin-bottom: 4px;
margin-right: 13px;
}
.pagelist {
font-size: 0;
background: #fff;
height: 40px;
line-height: 40px;
}
.pagelist span {
font-size: 14px;
}
.jump {
border: 1px solid #e5e5e5;
padding: 9px 15px;
cursor: pointer;
}
.jump:hover{
background: #526AA6;
border-color: #526AA6;
opacity: 0.8;
color: #fff
}
.first_page {
-webkit-border-top-left-radius: 3px;
-webkit-border-right-left-radius: 3px;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
.last_page {
-webkit-border-top-right-radius: 3px;
-webkit-border-right-right-radius: 3px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
.last_color{
color: #526AA6
}
.pagelist .bgprimary {
cursor: default;
color: #fff;
background: #526AA6;
border-color: #526AA6;
}
.jumpinp input {
width: 55px;
height: 26px;
font-size: 13px;
border: 1px solid #ccc;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
text-align: center;
}
.ellipsis {
padding: 0px 8px;
}
.jumppoint {
margin-left: 30px;
}
.pagelist .gobtn {
}
.bgprimary {
cursor: default;
color: #fff;
background: #337ab7;
border-color: #337ab7;
}
</style>
... ...
<template>
<div class="top">
<div class="top_wrap">
<!-- 上层 -->
<div class="logo_wrap clearfix">
<!-- logo -->
<div class="logo">
<img src="@/assets/img_3.png" alt />
</div>
<!-- 公司名称 -->
<div class="company_name">
全球移民与置业评估系统
<!-- International Immigration
<br />& Asset Allocation Assessed System-->
</div>
<!-- 个人信息 -->
<div class="person_msg clearfix" @mouseenter="showChoice()" @mouseleave="closeChoice()">
<div class="avatar">
<img :src="avatar" alt />
</div>
<div class="name">{{name}}</div>
<div class="bot_arrow">
<img :src="isTop?imgArrow1:imgArrow2" alt />
</div>
<!-- 修改密码 退出 -->
<div class="show_wrap" v-show="!isTop">
<div class="show_groups">
<!-- 修改密码 -->
<div class="change_pwd" @click="dialogPwdVisible = true">更改密码</div>
<!-- 退出 -->
<div class="logout" @click="loginOut()">退出</div>
</div>
</div>
</div>
</div>
<!-- 修改密码弹窗 -->
<div class="pwd_dialog">
<el-dialog :visible.sync="dialogPwdVisible" width="500px">
<div class="dialog_title_contract">更改密码</div>
<!-- 输入框 -->
<div class="input_group">
<el-form ref="form" :model="form" :rules="rules">
<el-form-item prop="oldPwd">
<el-input class="input_single" v-model="form.oldPwd" placeholder="请输入原密码"></el-input>
</el-form-item>
<el-form-item prop="newPwd">
<el-input class="input_single" v-model="form.newPwd" placeholder="请输入新密码"></el-input>
</el-form-item>
<el-form-item prop="repeatPwd">
<el-input class="input_single" v-model="form.repeatPwd" placeholder="请再次输入"></el-input>
</el-form-item>
</el-form>
<div class="pwd_btn layout flex_row justify_around align_center">
<div class="pwd_l_btn" @click="changePwd('form')">确定</div>
<div class="pwd_r_btn" @click="dialogPwdVisible = false">取消</div>
</div>
</div>
</el-dialog>
</div>
<!-- nav -->
<div class="nav_wrap">
<ul class="layout align_left flex_row">
<li
@click="choiceNav(index)"
class="nav_li"
:class="{active_li:isActive == index}"
v-for="(item,index) in navList"
:key="index"
>{{item}}</li>
</ul>
</div>
</div>
</div>
</template>
<script>
import { Message } from "element-ui";
import { post } from "../../api/http.js";
export default {
props: ["activeIndex"],
data() {
// 旧密码
var validateOldPass = (rule, value, callback) => {
if (!value) {
callback(new Error("请输入原密码"));
} else {
callback();
}
};
// 新密码
var validatePass = (rule, value, callback) => {
if (!value) {
callback(new Error("请输入新密码"));
} else {
callback();
}
};
// 确认密码
var validatePass2 = (rule, value, callback) => {
if (value == "") {
callback(new Error("请再次输入"));
} else if (value !== this.form.newPwd) {
callback(new Error("两次密码不一致!"));
} else {
callback();
}
};
return {
navList: ["首页", "我的客户", "工作报告", "个人中心"],
// 选中的按钮
isActive: 0,
// 个人信息箭头
isTop: true,
imgArrow1: require("@/assets/bot.png"),
imgArrow2: require("@/assets/top.png"),
// 修改密码弹窗
dialogPwdVisible: false,
token: "",
// 个人信息
avatar: "",
name: "",
// 重置密码
form: {
oldPwd: "",
newPwd: "",
repeatPwd: ""
},
// 验证密码
rules: {
oldPwd: [
{
required: true,
validator: validateOldPass,
trigger: "blur"
}
],
newPwd: [
{
required: true,
validator: validatePass,
trigger: "blur"
}
],
repeatPwd: [
{
required: true,
validator: validatePass2,
trigger: "blur"
}
]
}
};
},
methods: {
// 选择nav
choiceNav(index) {
this.isActive = index;
switch (index) {
case 0:
this.$router.push({ path: "/index" });
break;
case 1:
this.$router.push({ path: "/myClient" });
break;
case 2:
this.$router.push({ path: "/workReport" });
break;
case 3:
this.$router.push({ path: "/mine" });
break;
}
},
// 显示弹窗
showChoice() {
this.isTop = false;
},
// 弹窗消失
closeChoice() {
this.isTop = true;
},
// 修改密码
changePwd(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
let url = "/api/user/update_password";
let params = {
past_password: this.form.oldPwd,
now_password: this.form.newPwd,
repeat_password: this.form.repeatPwd
};
post(url, params).then(res => {
this.dialogPwdVisible = true;
this.$message({
showClose: true,
message: "修改成功",
type: "success"
});
});
}
});
},
// 退出登录
loginOut() {
let url = "/api/user/login_out";
post(url).then(res => {
this.$message({
showClose: true,
message: "退出成功",
type: "success"
});
localStorage.removeItem("token");
localStorage.removeItem("avatar");
localStorage.removeItem("type");
this.$router.push({
path: "/"
});
});
},
// 获取个人信息
getUserInfor() {
let url = "/api/user/member";
post(url).then(res => {
this.avatar = res.avatar;
this.name = res.name;
// type 1:业务员 2:代理商
localStorage.setItem("type", res.type);
});
}
},
mounted() {
this.isActive = this.activeIndex;
this.token = localStorage.getItem("token");
this.getUserInfor();
}
};
</script>
<style>
/* 修改密码弹窗 */
.pwd_dialog .el-dialog {
margin-top: 42vh !important;
}
.pwd_dialog .el-dialog__header {
display: none;
}
.pwd_dialog .el-dialog__body {
padding: 0 !important;
}
</style>
<style scoped>
.top {
border-bottom: 1px solid #999;
}
/* 内容 */
.top_wrap {
width: 1200px;
margin: 0 auto;
height: 162px;
position: relative;
}
/* logo */
.logo {
float: left;
width: 61px;
height: 60px;
margin-top: 26px;
margin-right: 20px;
}
/* 公司名称 */
.company_name {
float: left;
color: #6a6a6a;
font-size: 22px;
text-align: left;
margin-top: 40px;
line-height: 32px;
}
/* 个人信息 */
.person_msg {
float: right;
color: #6a6a6a;
font-size: 22px;
margin-top: 13px;
position: relative;
}
.avatar {
float: left;
width: 66px;
height: 66px;
}
.avatar img {
border-radius: 50%;
}
.name {
float: left;
margin: 22px 20px 0;
}
.bot_arrow {
float: left;
width: 23px;
/* height: 13px; */
margin-top: 24px;
}
/* 修改密码 退出 */
.show_wrap {
padding-top: 20px;
position: absolute;
left: 0;
bottom: -145px;
}
.show_groups {
width: 289px;
height: 135px;
background: rgba(255, 255, 255, 1);
box-shadow: 2px 0px 5px 1px rgba(0, 0, 0, 0.2);
color: #666;
font-size: 20px;
}
/* 修改密码 */
.change_pwd {
width: 100%;
height: 67px;
line-height: 67px;
text-align: center;
border-bottom: 1px solid #e2e2e2;
}
.change_pwd:hover,
.logout:hover {
background-color: #526aa6;
opacity: 0.8;
color: #fff;
}
.logout {
width: 100%;
height: 67px;
line-height: 67px;
text-align: center;
}
/* 修改密码弹窗 */
/* 头部 */
.dialog_title_contract {
color: #fff;
background-color: #526aa6;
padding-left: 30px;
height: 40px;
line-height: 40px;
text-align: left;
font-size: 18px;
}
/* 输入框 */
.input_group {
padding: 14px 20px;
}
.input_single {
/* margin-bottom: 25px; */
font-size: 14px;
}
/* 按钮 */
.pwd_btn {
margin: 40px auto 15px;
}
.pwd_l_btn {
width: 120px;
height: 38px;
background: rgba(82, 106, 166, 1);
border-radius: 3px;
text-align: center;
line-height: 38px;
color: #fff;
font-size: 16px;
}
.pwd_l_btn:hover {
opacity: 0.8;
}
.pwd_r_btn {
width: 118px;
height: 36px;
border: 1px solid rgba(153, 153, 153, 1);
border-radius: 3px;
text-align: center;
line-height: 38px;
color: #999;
font-size: 16px;
}
.pwd_r_btn:hover {
opacity: 0.8;
border-color: #526aa6;
}
/* nav */
.nav_wrap {
position: absolute;
bottom: 0;
left: 0;
/* margin-top: 21px; */
}
.nav_li {
font-size: 20px;
color: #333;
padding: 0 20px 16px;
border-bottom: 3px solid #fff;
}
.active_li {
color: #526aa6;
border-color: #526aa6;
}
</style>
\ No newline at end of file
... ...
<template>
<div class="evalute_one">
<div class="evalute_main">
<!-- 标题 -->
<div class="evalute_title_wrap layout flex_row align_left">
<div class="evalute_title_l"></div>
<div class="evalute_title_c">
<span class="evalute_title">
测评
<!-- Evaluation -->
</span>
</div>
<div class="evalute_title_r"></div>
</div>
<!-- 测试内容 -->
<div class="test_content">
<!-- 步骤条 -->
<div class="step_bar layout align_left">
<div class="step_single active_step">
第一步:国家选择
<!-- FIRST: Select country -->
</div>
<div class="step_img">
<img src="@/assets/img_12.png" alt />
</div>
<div class="step_single">
第二步:基本调查
<!-- SECOND: Questionnaire -->
</div>
<div class="step_img">
<img src="@/assets/img_11.png" alt />
</div>
<div class="step_single">
第三步:客户信息
<!-- THIRD: Customer Information -->
</div>
</div>
<!-- 测试问题 -->
<div class="test_question_wrap">
<div class="test_single">
<!-- 题目 -->
<div class="test_title">
1. *您想移民的国家?
<!-- * The country you want to immigrate to? -->
</div>
<!-- 答案 -->
<div class="test_answer layout align_left flex_row flex-wrap">
<div
class="answer_single"
:class="{active_ans:isChoice == index}"
v-for="(item,index) in ansList"
:key="index"
@click="choiceAns(item,index)"
>
{{item.country_name}}
<div class="choice_img" v-show="isChoice == item.id">
<img src="@/assets/img_10.png" alt />
</div>
</div>
</div>
</div>
<!-- 下一步 -->
<div class="next_step_wrap">
<div
class="next_step layout flex_row justify_center align_center"
@click="nextSecond()"
>
<div>
下一步
<!-- Next -->
</div>
<div class="next_icon">
<img src="@/assets/img_30.png" alt />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { Message } from "element-ui";
import { post } from "../../../api/http";
export default {
data() {
return {
ansList: [],
// 选中答案
isChoice: -1,
id: ""
};
},
methods: {
// 选择答案
choiceAns(item, index) {
this.isChoice = item.id;
this.id = item.id;
if (this.id != localStorage.getItem("countryId")) {
localStorage.removeItem("uploadAnswer");
localStorage.removeItem("choicedAnswer");
localStorage.removeItem("countryId");
localStorage.removeItem("formMsg");
localStorage.removeItem("evalute_result");
}
},
// 去第二步
nextSecond() {
if (this.id) {
localStorage.setItem("countryId", this.id);
this.$router.push({ path: "/evaluteTwo" });
} else {
this.$message({
showClose: true,
message: "Please choose",
type: "warning"
});
}
},
// 获取国家列表
getCountry() {
let url = "/api/template/get_country";
post(url).then(res => {
this.ansList = res;
});
}
},
mounted() {
this.isChoice = this.id = localStorage.getItem("countryId");
// 获取国家列表
this.getCountry();
}
};
</script>
<style scoped>
@import "../../../style/evalute.css";
</style>
\ No newline at end of file
... ...
<template>
<div class="evalute_one">
<div class="evalute_main">
<!-- 标题 -->
<div class="title">
评测结果
<!-- Evaluation results -->
</div>
<!-- 测试结果 -->
<div class="test_content">
<!-- 测试信息 -->
<div class="test_question_wrap">
<!-- 移民申请人信息 -->
<div class="msg_applicant layout justify flex_row">
<!-- 姓名 -->
<div class="apply_single">
<!-- 标题 -->
<div class="title_apply">
申请人
<!-- Applicant -->
</div>
<!-- 信息 -->
<div class="detail_apply">{{evaluteResult.name}}</div>
</div>
<!-- 移民地 -->
<div class="apply_single">
<!-- 标题 -->
<div class="title_apply">
申请国家
<!-- United States -->
</div>
<!-- 信息 -->
<div class="detail_apply">{{evaluteResult.country_name}}</div>
</div>
<!-- 预测分数 -->
<div class="apply_single">
<!-- 标题 -->
<div class="title_apply">
预测分值
<!-- Forecast scores -->
</div>
<!-- 信息 -->
<div class="detail_apply score_apply">{{evaluteResult.score}}</div>
</div>
<!-- 办理时长 -->
<div class="apply_single">
<!-- 标题 -->
<div class="title_apply">
预测办理时长
<!-- Forecast processing time -->
</div>
<!-- 信息 -->
<div class="detail_apply time_apply">
<div>
<span
class="month_apply"
:class="{pass_color:evaluteResult.is_pass==2}"
>{{evaluteResult.month}}</span>
<span class="month_position">
个月
<!-- Months -->
</span>
</div>
</div>
</div>
</div>
<!-- 评测建议 -->
<div class="apply_suggest">
<div class="sugges_title">
测评建议
<!-- Evaluation recommendations -->
</div>
<div class="suggest_detail" v-html="evaluteResult.content"></div>
</div>
<!-- 上一页 提交 撤销 -->
<div class="btn_group">
<div class="layout align_center justify_center flex_row">
<div class="btn_l" @click="revalute()">
重新测评
<!-- Revaluation -->
</div>
<div class="btn_l btn_c" @click="submitNow()">
提交审核
<!-- Submit -->
</div>
<div class="btn_l" @click="cancelSubmit()">
关闭
<!-- Cancel -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { Message } from "element-ui";
import { post } from "../../../api/http";
export default {
data() {
return {
// 测评结果
evaluteResult: "",
// 国家id
countryId: "",
// 第二步答案
choiceAns: "",
// 个人信息
formLabelChinese: "",
// 上传的文件
uploadAns: ""
};
},
methods: {
// 重新审核
revalute() {
this.$router.push({ path: "/evaluteOne" });
},
// 提交审核
submitNow() {
let url = "/api/template/submit";
let params = {
id: this.evaluteResult.id,
country_id: this.countryId,
name: this.formLabelChinese.name,
gender: this.formLabelChinese.gender,
card_number: this.formLabelChinese.card_number,
passport_number: this.formLabelChinese.passport_number,
country: this.formLabelChinese.nation,
mobile: this.formLabelChinese.phone,
first_name: this.formLabelChinese.first_name,
middle_name: this.formLabelChinese.middle_name,
last_name: this.formLabelChinese.last_name,
postcode: this.formLabelChinese.postCode,
address1:this.formLabelChinese.add1,
address2:this.formLabelChinese.add2,
address3:this.formLabelChinese.add3,
content1: this.choiceAns,
content2: this.uploadAns
};
post(url, params).then(res => {
localStorage.removeItem("uploadAnswer");
localStorage.removeItem("choicedAnswer");
localStorage.removeItem("countryId");
localStorage.removeItem("formMsg");
localStorage.removeItem("evalute_result");
this.$router.push({ path: "/myClient" });
})
.catch(err=>{
localStorage.removeItem("uploadAnswer");
localStorage.removeItem("choicedAnswer");
localStorage.removeItem("countryId");
localStorage.removeItem("formMsg");
localStorage.removeItem("evalute_result");
});
},
// 关闭
cancelSubmit() {
this.$router.push({ path: "/indexMid" });
}
},
mounted() {
this.countryId = localStorage.getItem("countryId");
this.choiceAns = JSON.parse(localStorage.getItem("choicedAnswer"));
this.uploadAns = JSON.parse(localStorage.getItem("uploadAnswer"));
this.formLabelChinese = JSON.parse(localStorage.getItem("formMsg"));
this.evaluteResult = JSON.parse(localStorage.getItem("evalute_result"));
}
};
</script>
<style scoped>
@import "../../../style/evalute.css";
/* 标题 */
.title {
color: #526aa6;
font-size: 30px;
width: 100%;
height: 94px;
border-bottom: 2px solid #526aa6;
text-align: center;
font-weight: bold;
line-height: 94px;
}
.test_question_wrap {
margin: 0 20px;
}
/* 移民申请人信息 */
.msg_applicant {
margin-top: 36px;
}
.apply_single {
width: 264px;
border: 1px solid #526aa6;
border-radius: 3px;
}
/* 申请信息类目 */
.title_apply {
width: 100%;
height: 31px;
line-height: 31px;
text-align: center;
font-weight: bold;
font-size: 18px;
color: #fff;
background-color: #526aa6;
}
/* 申请人信息 */
.detail_apply {
width: 100%;
height: 76px;
line-height: 76px;
text-align: center;
color: #333;
font-size: 16px;
}
/* 评测分数 */
.score_apply {
font-size: 48px;
color: #f90000;
}
/* 评测时长 */
.month_apply {
color: #008000;
font-size: 48px;
}
.pass_color {
color: #f90000;
font-size: 48px;
}
/* 月份单位 */
.month_position {
color: #333;
font-size: 16px;
font-weight: bold;
margin-left: 15px;
}
/* 评测建议 */
.apply_suggest {
width: 100%;
border: 1px solid #526aa6;
border-radius: 3px;
margin-top: 60px;
}
.sugges_title {
height: 34px;
line-height: 34px;
background-color: #526aa6;
color: #fff;
font-weight: bold;
font-size: 18px;
padding-left: 13px;
text-align: left;
}
.suggest_detail {
padding: 14px 20px;
color: #666;
font-size: 16px;
text-align: left;
}
/* 提交 */
.btn_group {
margin: 100px auto 0;
}
.btn_l {
width: 120px;
height: 38px;
text-align: center;
line-height: 38px;
border: 1px solid #999;
font-size: 20px;
color: #666;
border-radius: 3px;
}
.btn_l:hover {
border-color: #526aa6;
opacity: 0.8;
}
.btn_c {
color: #fff;
background-color: #526aa6;
border-color: #526aa6;
margin: 0 60px;
}
</style>
\ No newline at end of file
... ...
<template>
<div class="evalute_one evalute_three">
<div class="evalute_main">
<!-- 标题 -->
<div class="evalute_title_wrap layout flex_row align_left">
<div class="evalute_title_l"></div>
<div class="evalute_title_c">
<span class="evalute_title">
测评
<!-- Evaluation -->
</span>
</div>
<div class="evalute_title_r"></div>
</div>
<!-- 测试内容 -->
<div class="test_content">
<!-- 步骤条 -->
<!-- 步骤条 -->
<div class="step_bar layout align_left">
<div class="step_single ">
第一步:国家选择
<!-- FIRST: Select country -->
</div>
<div class="step_img">
<img src="@/assets/img_12.png" alt />
</div>
<div class="step_single">
第二步:基本调查
<!-- SECOND: Questionnaire -->
</div>
<div class="step_img">
<img src="@/assets/img_11.png" alt />
</div>
<div class="step_single active_step">
第三步:客户信息
<!-- THIRD: Customer Information -->
</div>
</div>
<!-- 客户信息 -->
<div class="test_question_wrap third_form">
<!-- 客户信息 -->
<div class="customer_infor">
<!-- 标题 -->
<div class="customer_title_wrap">
<div class="customer_title">
客户信息
<!-- Customer Information -->
</div>
<div class="customer_infor_tips">
信息的准确性将影响到移民的成功率,请务必如实填写。
<!-- The accuracy of the information will affect the success rate of immigrants.Please fill in the information truly and correctly -->
</div>
</div>
<!-- 表单 -->
<!-- 中文 -->
<el-form
class="layout flex_row align_left"
label-position="left"
label-width="150px"
:model="formLabelChinese"
:rules="rules"
ref="formLabelChinese"
>
<div class="chinese_form">
<el-form-item label="中文姓名:" prop="name">
<el-input v-model="formLabelChinese.name"></el-input>
</el-form-item>
<el-form-item label="性别:" prop="gender">
<el-select v-model="formLabelChinese.gender" placeholder="请选择">
<el-option label="男" value="1"></el-option>
<el-option label="女" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="身份证号:" prop="card_number">
<el-input v-model="formLabelChinese.card_number" maxlength="18"></el-input>
</el-form-item>
<el-form-item label="护照号码:" prop="passport_number">
<el-input v-model="formLabelChinese.passport_number"></el-input>
</el-form-item>
<el-form-item label="国籍:" prop="nation">
<el-select
v-model="formLabelChinese.nation"
placeholder="请选择"
>
<el-option
v-for="item in countryList"
:key="item.id"
:label="item.name_en"
:value="item.name_en"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="联系电话:" prop="phone">
<el-input v-model="formLabelChinese.phone" maxlength="11"></el-input>
</el-form-item>
</div>
<div class="english_form">
<div class="layout flex_row">
<el-form-item
label="English name:"
class="input_single first_name"
prop="first_name"
>
<el-input placeholder="First/Given Name" v-model="formLabelChinese.first_name"></el-input>
</el-form-item>
<el-form-item label class="input_single second_name" prop="middle_name">
<el-input placeholder="Middle Name" v-model="formLabelChinese.middle_name"></el-input>
</el-form-item>
<el-form-item label class="input_single second_name" prop="last_name">
<el-input placeholder="Last/Family Name" v-model="formLabelChinese.last_name"></el-input>
</el-form-item>
</div>
<el-form-item label="Address1:" prop="add1">
<el-input v-model="formLabelChinese.add1"></el-input>
</el-form-item>
<el-form-item label="Address2:">
<el-input v-model="formLabelChinese.add2"></el-input>
</el-form-item>
<el-form-item label="Address3:">
<el-input v-model="formLabelChinese.add3"></el-input>
</el-form-item>
<el-form-item label="Postcode:" prop="postCode">
<el-input v-model="formLabelChinese.postCode" maxlength="6"></el-input>
</el-form-item>
</div>
</el-form>
<!-- </div> -->
</div>
<!-- 其它加分项 -->
<div class="other_option">
<!-- 标题 -->
<div class="customer_title_wrap">
<div class="customer_title">
其他加分项
<!-- The extra point column -->
</div>
<div class="customer_infor_tips">
以下项均为非必填
<!-- The following items are optional -->
</div>
</div>
<!-- 上传文件 -->
<div class="personal_property" v-for="(item,index) in uploadList" :key="index">
<!-- 表头 -->
<div class="table_wrap_title">
<div class="table_title">{{item.question_name}}</div>
<div class="table_tips">{{item.upload_explain}}</div>
<!-- 上传文件 -->
<el-upload
class="upload-demo"
action="http://yiminadmin.zishike.cn/api/common/upload"
:headers="headers"
:on-success="uploadSuccProperty"
>
<!-- <el-upload
class="upload-demo"
action="http://yiminadmin.zishike.com/api/common/upload"
:headers="headers"
:on-success="uploadSuccProperty"
> -->
<!-- http://yiminadmin.zishike.com -->
<div class="table_upload" @click="getItem(item)">
<img src="@/assets/img_25.png" alt />
</div>
</el-upload>
</div>
<!-- 表格 -->
<div class="personal_table_wrap">
<el-table
v-if="item.tableData.length>0"
ref="singleTable"
:data="item.tableData"
highlight-current-row
:row-class-name="getRowIndex"
@cell-mouse-enter="enterTable"
@cell-mouse-leave="leaveTable"
style="width: 100%"
:cell-style="cellStyle"
:header-row-style="changeHeader"
>
<el-table-column property="file_name" label="文件名" align="center"></el-table-column>
<el-table-column property="file_size" label="文件大小" align="center"></el-table-column>
<el-table-column property="state" label="状态" align="center"></el-table-column>
<el-table-column property="opertion" label="操作" align="center">
<template slot-scope="scope">
<div class="layout justify_center align_center">
<div class="layout flex_row align_center">
<div class="watch_pdf">
<a :href="scope.row.url" target="_blank" rel="noopener noreferrer">
<img :src="scope.row.showIcon == true?watchImg2:watchImg1" alt />
</a>
</div>
<div class="delete_pdf" @click="deleteDialog(item,scope.row)">
<img :src="scope.row.showIcon == true?deleteImg2:deleteImg1" alt />
</div>
</div>
</div>
</template>
</el-table-column>
</el-table>
<div class="no_upload" v-else>
请上传文件
<!-- Please upload the file -->
</div>
<!-- 删除确认弹窗 -->
<el-dialog
lock-scroll
:visible.sync="dialogVisible"
width="498px"
:before-close="handleClose"
>
<div class="capion_title">提示</div>
<div class="capion_tips">确认要删除吗?</div>
<div slot="footer" class="dialog-footer clearfix">
<div class="dialog_btn_l dialog_btn_r" @click="deleteSure()">确认</div>
<div class="dialog_btn_l" @click="dialogVisible = false">取消</div>
</div>
</el-dialog>
</div>
</div>
</div>
<!-- 上一页 提交 撤销 -->
<div class="btn_group">
<div class="layout align_center justify_center flex_row">
<div class="btn_l" @click="prevPage()">
上一步
<!-- Back -->
</div>
<div class="btn_l btn_c" @click="submitNow('formLabelChinese')">
提交
<!-- Submit -->
</div>
<div class="btn_l" @click="cancelSubmit()">
取消
<!-- Cancel -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { Message } from "element-ui";
import { post } from "../../../api/http";
let uploadObj = {};
let uploadObjk={};
export default {
data() {
// 身份证号正则
var validateIdNum = (rule, value, callback) => {
if (
!/^(([1][1-5])|([2][1-3])|([3][1-7])|([4][1-6])|([5][0-4])|([6][1-5])|([7][1])|([8][1-2]))\d{4}(([1][9]\d{2})|([2]\d{3}))(([0][1-9])|([1][0-2]))(([0][1-9])|([1-2][0-9])|([3][0-1]))\d{3}[0-9xX]$/.test(
value
)
) {
callback(new Error("请输入身份证号"));
} else {
callback();
}
};
// 手机号码正则
var validatePhone = (reule, value, callback) => {
if (!/^1\d{10}$/.test(value)) {
callback(new Error("请输入手机号码"));
} else {
callback();
}
};
// 邮编正则
var validatePostCode = (resule, value, callback) => {
if (!/^[0-9]{6}$/.test(value)) {
callback(new Error("请输入邮编"));
} else {
callback();
}
};
return {
// 国家选择
countryList: [],
countryId: "",
// 选中答案
isChoice: -1,
// 中文表单
formLabelChinese: {
name: "",
gender: "",
card_number: "",
passport_number: "",
nation: "",
phone: "",
first_name: "",
middle_name: "",
last_name: "",
add1: "",
add2: "",
add3: "",
postCode: ""
},
rules: {
name: [
{
required: true,
message: "请输入您的名字",
trigger: "blur"
}
],
gender: [
{
required: true,
message: "请选择您的性别",
trigger: "change"
}
],
card_number: [
{
required: true,
validator: validateIdNum,
trigger: "blur"
}
],
passport_number: [
{
required: true,
message: "请输入您的护照号码",
trigger: "blur"
}
],
nation: [
{
required: true,
message: "请选择您的国籍",
trigger: "change"
}
],
phone: [
{
required: true,
validator: validatePhone,
trigger: "blur"
}
],
first_name: [
{
required: true,
message: "Please enter first name",
trigger: "blur"
}
],
last_name: [
{
required: true,
message: "Please enter last name",
trigger: "blur"
}
],
add1: [
{
required: true,
message: "Please enter address",
trigger: "blur"
}
]
},
currentRow: null,
// 删除弹窗
dialogVisible: false,
deleteId: "",
// 删除的表格
deleteList: "",
// 删除的下标
deleteIndex: "",
// 查看icon
watchImg1: require("../../../assets/img_7.png"),
watchImg2: require("../../../assets/img_6.png"),
// 删除icon
deleteImg1: require("../../../assets/img_24.png"),
deleteImg2: require("../../../assets/img_23.png"),
// 国家id
countryId: "",
uploadList: [],
// 上传文件请求头
headers: {
token: ""
},
// 当前点击的上传
tableId: "",
tableData: [],
tableDatak:[],
// 第二步答案
choiceAns: "",
// 文件是否为必传
requireObj: {}
};
},
methods: {
// 表格
// 修改表头样式
changeHeader({ row, rowIndex }) {
return "color:#333;font-size:16px";
},
// 修改第一列样式
cellStyle({ row, column, rowIndex, columnIndex }) {
if (columnIndex == 0) {
return "color:#003CFF";
}
},
// 获取国家列表
getCountryList() {
let url = "/api/sundry/get_country";
post(url).then(res => {
this.countryList = res;
});
},
// 上传证明
// 上传成功回调
uploadSuccProperty(response, file, fileList) {
if (response.code == 1) {
// 上传成功
var obj = {};
var objk={};
const fileSize = (file.size / 1024 / 1024).toFixed(2) + "M";
obj["file_name"] = file.name;
obj["file_size"] = fileSize;
obj["state"] = "上传成功";
obj["url"] = response.data.url;
obj["showIcon"] = false;
obj["id"] = this.tableId;
this.tableData.push(obj);
objk["file_name"] = file.name;
objk["file_size"] = fileSize;
objk["state"] = "上传成功";
objk["url"] = response.data.relative_url;
objk["showIcon"] = false;
objk["id"] = this.tableId;
this.tableDatak.push(objk);
for (let obj of this.uploadList) {
if (this.tableId == obj.id) {
obj.tableData = this.tableData;
}
}
uploadObj[this.tableId] = this.tableData;
uploadObjk[this.tableId] = this.tableDatak;
localStorage.setItem("uploadAnswer", JSON.stringify(uploadObj));
localStorage.setItem("uploadAnswerk", JSON.stringify(uploadObjk));
console.log('3443734',uploadObjk)
} else if (response.code == 0) {
// 上传失败
this.$message.error(response.msg);
}
},
// 上传对应的表格
getItem(item) {
this.tableId = item.id;
this.tableData = item.tableData;
},
// 获取该行的下标
getRowIndex({ row, rowIndex }) {
row.index = rowIndex;
},
// 删除弹窗
deleteDialog(item, row) {
this.dialogVisible = true;
this.deleteList = item.tableData;
this.deleteIndex = row.index;
this.deleteId = row.id;
},
// 确认删除
deleteSure() {
// 删除缓存中对应的数据
let uploadAnswer = JSON.parse(localStorage.getItem("uploadAnswer"));
for (let i in uploadAnswer) {
if (i == this.deleteId) {
uploadAnswer[i].splice(this.deleteIndex, 1);
}
}
localStorage.setItem("uploadAnswer", JSON.stringify(uploadAnswer));
let uploadAnswerk = JSON.parse(localStorage.getItem("uploadAnswerk"));
for (let i in uploadAnswerk) {
if (i == this.deleteId) {
uploadAnswerk[i].splice(this.deleteIndex, 1);
}
}
localStorage.setItem("uploadAnswerk", JSON.stringify(uploadAnswerk));
// 删除表格中的数据
this.deleteList.splice(this.deleteIndex, 1);
this.dialogVisible = false;
},
// 删除之前
handleClose(done) {
this.dialogVisible = false;
},
// 返回上一页
prevPage() {
this.$router.push({ path: "/evaluteTwo" });
},
// 提交
submitNow(formName) {
// 判断文件是否为必传
let isRequire = "";
// console.log(this.requireObj,uploadObj,"提交")
for (let item in this.requireObj) {
// 所有文件都为非必传
if (this.requireObj[item] == 0) {
isRequire = true;
}
// console.log(this.requireObj[item] == 0)
}
if (isRequire) {
// JSON.stringify(uploadObj) != "{}"
this.$refs[formName].validate(valid => {
if (valid) {
localStorage.setItem(
"formMsg",
JSON.stringify(this.formLabelChinese)
);
let url = "/api/template/get_result";
let params = {
country_id: this.countryId,
name: this.formLabelChinese.name,
gender: this.formLabelChinese.gender,
card_number: this.formLabelChinese.card_number,
passport_number: this.formLabelChinese.passport_number,
country: this.formLabelChinese.nation,
mobile: this.formLabelChinese.phone,
first_name: this.formLabelChinese.first_name,
middle_name: this.formLabelChinese.middle_name,
last_name: this.formLabelChinese.last_name,
postcode: this.formLabelChinese.postCode,
address1: this.formLabelChinese.add1,
address2: this.formLabelChinese.add2,
address3: this.formLabelChinese.add3,
content1: this.choiceAns,
content2: JSON.parse(localStorage.getItem("uploadAnswerk"))
};
post(url, params).then(res => {
localStorage.setItem("evalute_result", JSON.stringify(res));
uploadObj = {};
this.$router.push({ path: "/evaluteResult" });
});
} else {
this.$message({
showClose: true,
message: "请填写完整信息",
type: "warning"
});
}
});
} else {
this.$message({
showClose: true,
message: "请上传",
type: "warning"
});
}
},
// 取消
cancelSubmit() {
localStorage.removeItem("uploadAnswer");
localStorage.removeItem("choicedAnswer");
localStorage.removeItem("countryId");
localStorage.removeItem("formMsg");
localStorage.removeItem("evalute_result");
this.$router.push({ path: "/indexMid" });
},
// 操作
// 划过单元格
enterTable(row, column, cell, event) {
row.showIcon = true;
},
leaveTable(row, column, cell, event) {
row.showIcon = false;
},
// 获取文件上传问题
getUpload() {
let url = "/api/template/get_question3";
let params = {
country_id: this.countryId
};
post(url, params).then(res => {
for (let obj of res) {
obj.tableData = [];
}
// 数据回显
let uploadAnswer = JSON.parse(localStorage.getItem("uploadAnswer"));
if (uploadAnswer) {
uploadObj = uploadAnswer;
}
for (let i in uploadObj) {
for (let obj of res) {
if (i == obj.id) {
obj.tableData = uploadObj[i];
}
}
}
this.uploadList = res;
console.log(this.uploadList, "文件上传");
// let requireObj = {};
res.forEach(ele => {
this.requireObj[ele.id] = ele.is_required;
});
});
}
},
mounted() {
this.headers.token = localStorage.getItem("token");
// 国家id
this.countryId = localStorage.getItem("countryId");
// 获取国家列表
this.getCountryList();
// 第二步答案
this.choiceAns = JSON.parse(localStorage.getItem("choicedAnswer"));
// 个人信息 回显
if (localStorage.getItem("formMsg")) {
this.formLabelChinese = JSON.parse(localStorage.getItem("formMsg"));
}
this.getUpload();
}
};
</script>
<style>
.third_form .el-form-item__label {
font-weight: bold;
color: #666;
font-size: 16px;
}
.third_form .el-input__inner {
height: 35px;
line-height: 35px;
border-radius: 3px;
font-size: 12px;
}
/* 中文表单 输入框 */
.chinese_form .el-input__inner {
width: 302px;
}
/* 英文表单 输入框 */
/* 英文名字 */
.english_form .input_single {
width: 139px;
}
.english_form .input_single .el-input {
width: 139px !important;
}
.english_form .first_name {
width: 289px;
}
.english_form .input_single:nth-child(2) {
margin: 0 10px !important;
}
.english_form .input_single .el-input .el-input__inner {
width: 139px !important;
}
.english_form .second_name .el-form-item__content {
margin-left: 0 !important;
}
/* 表格 */
.third_form .el-table thead th {
background-color: #fff !important;
}
.third_form .el-table th > .cell {
font-weight: bold;
}
/* 表头下划线 */
.third_form .el-table td,
.third_form .el-table th.is-leaf {
border-bottom-color: #999;
}
/* 去掉行的下划线 */
.third_form .el-table__row > td {
border: none;
}
.third_form .el-table::before {
/* 去掉最下面的那一条线 */
height: 0px;
}
/* 上传文件回显列表 */
.third_form .el-upload-list {
display: none;
}
/* 删除弹窗 */
.third_form .el-dialog {
background-color: #526aa6;
box-shadow: 2px 0px 5px 1px rgba(0, 0, 0, 0.2);
}
.third_form .el-dialog__body {
color: #fff;
text-align: left;
}
/* x号 */
.third_form .el-dialog__headerbtn {
top: 12px;
right: 12px;
}
.third_form .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
/* 底部 */
.third_form .el-dialog__footer {
background-color: #fff;
color: #999;
padding: 0;
}
</style>
<style scoped>
@import "../../../style/evalute.css";
.evalute_main {
height: auto;
padding-bottom: 60px;
}
/* 客户信息 */
.customer_title_wrap {
margin-bottom: 35px;
text-align: left;
margin-top: 55px;
}
.customer_title {
color: #526aa6;
font-size: 20px;
font-weight: bold;
}
.customer_infor_tips {
color: #999;
font-size: 14px;
}
/* 中文表单 */
.chinese_form {
margin-right: 117px;
}
.english_form {
/* width: 526px */
}
/* 其他加分项 */
.other_option {
margin-top: 60px;
}
/* 个人房产证明 */
.personal_property {
margin-top: 36px;
margin-right: 21px;
border: 1px solid #526aa6;
border-radius: 3px;
}
/* 表头 */
.table_wrap_title {
width: 100%;
height: 52px;
background-color: #526aa6;
border-radius: 3px 3px 0 0;
color: #fff;
text-align: left;
position: relative;
}
.table_title {
font-size: 18px;
font-weight: bold;
padding-top: 9px;
margin-left: 17px;
}
.table_tips {
font-size: 12px;
margin-left: 17px;
}
/* 上传文件 */
.table_upload {
position: absolute;
right: 18px;
top: 7px;
width: 22px;
height: 20px;
}
/* 表格 */
.personal_table_wrap {
margin: 0 20px 20px;
}
/* 操作 */
.watch_pdf {
width: 34px;
height: 20px;
margin-right: 13px;
border-radius: 3px;
}
.delete_pdf {
width: 34px;
height: 20px;
border-radius: 3px;
}
/* 暂无上传 */
.no_upload {
margin: 22px auto;
color: #666;
font-size: 16px;
}
/* 弹窗内文字 */
.capion_title {
font-size: 20px;
font-weight: bold;
}
.capion_tips {
font-size: 16px;
margin-top: 20px;
margin-bottom: 50px;
}
/* 底部按钮 */
.dialog_btn_l {
float: left;
width: 50%;
height: 84px;
line-height: 84px;
text-align: center;
font-size: 16px;
}
.dialog_btn_r {
position: relative;
}
.dialog_btn_r::before {
position: absolute;
top: 0;
right: 0;
content: "";
width: 1px;
height: 84px;
background-color: #999;
}
.dialog_btn_l:hover {
color: #fff;
background-color: #526aa6;
opacity: 0.8;
}
/* 提交 */
.btn_group {
margin: 100px auto 0;
}
.btn_l {
width: 120px;
height: 38px;
text-align: center;
line-height: 38px;
border: 1px solid #999;
font-size: 20px;
color: #666;
border-radius: 3px;
}
.btn_c {
color: #fff;
background-color: #526aa6;
border-color: #526aa6;
margin: 0 60px;
}
.btn_l:hover {
border-color: #526aa6;
opacity: 0.8;
}
</style>
\ No newline at end of file
... ...
<template>
<div class="evalute_one">
<div class="evalute_main">
<!-- 标题 -->
<div class="evalute_title_wrap layout flex_row align_left">
<div class="evalute_title_l"></div>
<div class="evalute_title_c">
<span class="evalute_title">
测评
<!-- Evaluation -->
</span>
</div>
<div class="evalute_title_r"></div>
</div>
<!-- 测试内容 -->
<div class="test_content">
<!-- 步骤条 -->
<!-- 步骤条 -->
<div class="step_bar layout align_left">
<div class="step_single ">
第一步:国家选择
<!-- FIRST: Select country -->
</div>
<div class="step_img">
<img src="@/assets/img_12.png" alt />
</div>
<div class="step_single active_step">
第二步:基本调查
<!-- SECOND: Questionnaire -->
</div>
<div class="step_img">
<img src="@/assets/img_11.png" alt />
</div>
<div class="step_single">
第三步:客户信息
<!-- THIRD: Customer Information -->
</div>
</div>
<!-- 测试问题 -->
<div class="test_question_wrap">
<!-- 第一题 -->
<div class="test_single" v-for="(item,index) in ansList" :key="index">
<!-- 题目 -->
<div class="test_title">
{{index+1}}.
<i v-show="item.is_required == 1">*</i>
{{item.question_name}}
<span
class="money"
v-show="item.hint"
>({{item.hint}})</span>
</div>
<!-- 答案 -->
<!-- item.type 1:选择题 2:填空题 -->
<div class="test_answer layout align_left flex_row flex-wrap" v-if="item.type == 1">
<div
class="answer_single"
:class="{active_ans:secondItem.choice}"
v-for="(secondItem,secondIndex) in item.option"
:key="secondIndex"
@click.stop="choiceAns(item.id,secondItem)"
>
{{secondItem.option_name}}
<div class="choice_img" v-show="secondItem.choice">
<img src="@/assets/img_10.png" alt />
</div>
</div>
</div>
<!-- 答案 -->
<div v-else>
<div
class="test_answer layout align_left flex_row flex-wrap"
v-if="item.content_type == 1"
>
<el-input
type="number"
v-model="item.inputVal"
class="money_input"
placeholder="请输入金额"
@change="changeValue(item)"
></el-input>
<span class="money" v-show="item.currency_name">({{item.currency_name}})</span>
</div>
<!-- 时间选择器 -->
<div class="test_answer layout align_left" v-else>
<el-date-picker
v-model="item.inputVal"
type="date"
placeholder="选择日期"
format="yyyy 年 MM 月 dd 日"
value-format="timestamp"
@change="changeTime(item)"
></el-date-picker>
</div>
</div>
</div>
<!-- 下一步 -->
<div class="next_step_wrap">
<div class="layout align_center justify_center flex_row">
<div class="btn_l" @click="prevPage()">
上一步
<!-- Back -->
</div>
<div
class="next_step layout flex_row justify_center align_center"
@click="nextSecond()"
>
<div>
下一步
<!-- Next -->
</div>
<div class="next_icon">
<img src="@/assets/img_30.png" alt />
</div>
</div>
<div class="btn_l" @click="cancelSubmit()">
取消
<!-- Cancel -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { post } from "../../../api/http";
let choicedObj = {};
export default {
data() {
return {
// 选择题
ansList: [],
// 选中答案
isChoice: "",
// 国家id
countryId: "",
// 填空题
number: "",
// 时间戳
value3: ""
};
},
methods: {
// 选择题答案
choiceAns(itemId, secondItem) {
for (let obj of this.ansList) {
// 找到对应的选择题
if (itemId == obj.id) {
for (let options of obj.option) {
// 找到选择的答案
if (secondItem.option_name == options.option_name) {
options.choice = true;
} else {
options.choice = false;
}
}
}
}
choicedObj[itemId] = secondItem.option_name;
localStorage.setItem("choicedAnswer", JSON.stringify(choicedObj));
},
// 填空题
changeValue(item) {
choicedObj[item.id] = item.inputVal;
localStorage.setItem("choicedAnswer", JSON.stringify(choicedObj));
},
// 时间选择器
changeTime(item) {
choicedObj[item.id] = item.inputVal;
localStorage.setItem("choicedAnswer", JSON.stringify(choicedObj));
},
// 去第一步
prevPage() {
this.$router.push({ path: "/evaluteOne" });
},
// 取消
cancelSubmit() {
localStorage.removeItem("uploadAnswer");
localStorage.removeItem("choicedAnswer");
localStorage.removeItem("countryId");
localStorage.removeItem("formMsg");
localStorage.removeItem("evalute_result");
this.$router.push({ path: "/indexMid" });
},
// 去第三步
nextSecond() {
choicedObj = {};
let choicedAns = JSON.parse(localStorage.getItem("choicedAnswer"));
// 所有必填项
let allId = [];
// 已选必填项
let request = [];
// 已选择题目id
let choicedId = [];
for (let i in choicedAns) {
choicedId.push(i / 1);
}
for (let obj of this.ansList) {
if (obj.is_required == 1) {
// 必填项
allId.push(obj.id);
}
}
// 已回答题目是否全部包含必填项
for (let item of allId) {
if (choicedId.indexOf(item) > -1) {
request.push(item);
}
}
if (request.length == allId.length) {
// 必填项已全部回答
this.$router.push({ path: "/evaluteThree" });
} else {
this.$message({
showClose: true,
message: "Please answer the questions that must be answered",
type: "warning"
});
}
},
// 获取题目
getChoiceQuestion() {
let url = "/api/template/get_question2";
let params = {
country_id: this.countryId
};
post(url, params).then(res => {
// 重组选择题答案
for (let r of res) {
// 选择题
if (r.type == 1) {
for (let option of r.option) {
option.choice = false;
}
} else {
// 填空题
r.inputVal = "";
}
}
// 数据回显
let choicedAnswer = JSON.parse(localStorage.getItem("choicedAnswer"));
if (choicedAnswer) {
choicedObj = choicedAnswer;
}
for (let i in choicedObj) {
for (let obj of res) {
// 根据id找到对应的题目
if (i == obj.id) {
if (obj.type == 1) {
// 选择题
// 找到对应的选项
for (let name of obj.option) {
if (choicedObj[i] == name.option_name) {
name.choice = true;
}
}
} else if (obj.type == 2) {
// 填空题
obj.inputVal = choicedObj[i];
}
}
}
}
this.ansList = res;
});
}
},
mounted() {
// 国家id
this.countryId = localStorage.getItem("countryId");
// 获取题目
this.getChoiceQuestion();
}
};
</script>
<style scoped>
@import "../../../style/evalute.css";
.evalute_main {
height: auto;
padding-bottom: 60px;
}
.text_second_single {
margin-top: 80px;
}
.test_title_tips {
font-size: 18px;
color: #999;
}
/* 金额 */
.money_input {
width: 359px;
border-radius: 3px;
font-size: 16px;
}
.money {
color: #666;
font-size: 20px;
font-weight: bold;
margin-left: 20px;
line-height: 38px;
}
.next_step {
margin: 0 60px;
}
/* 下一步 */
.btn_l {
width: 120px;
height: 36px;
text-align: center;
line-height: 38px;
border: 1px solid #999;
font-size: 20px;
color: #666;
border-radius: 3px;
}
.btn_l:hover {
border-color: #526aa6;
opacity: 0.8;
}
</style>
\ No newline at end of file
... ...
<template>
<div class="index_wrap">
<Top :activeIndex="activeIndex"></Top>
<router-view></router-view>
<Bottom></Bottom>
</div>
</template>
<script>
import Top from "../../common/top";
import Bottom from "../../common/bottom";
export default {
data(){
return{
activeIndex:0
}
},
methods:{
// 去测评
toEvalute(){
},
},
components:{
Top,
Bottom
},
mounted(){
},
}
</script>
<style scoped>
.main{
width: 1200px;
margin: 28px auto;
height: 750px;
box-shadow: #ccc 0px 0px 5px;
}
/* 标题 */
.title{
color: #526AA6;
font-size: 30px;
width: 100%;
height:94px;
border-bottom: 2px solid #526AA6;
text-align: center;
font-weight: bold;
line-height: 94px;
}
/* 开始测评 */
.start_test_wrap{
width: 100%;
}
.start_test{
margin: 80px 90px 0 86px
}
.start_title{
font-size: 26px;
color: #333;
text-align: left;
margin-bottom: 26px;
}
.start_content{
font-size: 18px;
color: #666;
text-align: left;
line-height: 20px;
}
.start_btn{
width: 200px;
height: 38px;
text-align: center;
line-height: 38px;
background-color: #526AA6;
color: #fff;
font-size: 20px;
border-radius: 3px;
margin: 120px auto 0;
}
</style>
\ No newline at end of file
... ...
<template>
<div class="index_wrap">
<!-- 主体 -->
<div class="main">
<!-- 标题 -->
<div class="title">
<!-- The measurement instructions -->
测评说明
</div>
<!-- 开始测评 -->
<div class="start_test_wrap">
<div class="start_test">
<div class="start_title">测评说明</div>
<div class="start_content" v-html="content"></div>
<div class="start_btn" @click="toEvalute()">开始测评</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { post } from "../../../api/http";
export default {
data(){
return{
content:"",
}
},
methods:{
// 去测评
toEvalute(){
this.$router.push({path:"/evaluteOne"})
},
// 获取测评说明
getEvalute(){
let url = "/api/sundry/get_explain";
post(url)
.then(res=>{
this.content = res.content;
console.log(this.content)
})
},
},
mounted(){
this.getEvalute()
},
}
</script>
<style scoped>
.main{
width: 1200px;
margin: 28px auto;
/* height: 750px; */
padding-bottom: 100px;
box-shadow: #ccc 0px 0px 5px;
}
/* 标题 */
.title{
color: #526AA6;
font-size: 30px;
width: 100%;
height:94px;
border-bottom: 2px solid #526AA6;
text-align: center;
font-weight: bold;
line-height: 94px;
}
/* 开始测评 */
.start_test_wrap{
width: 100%;
}
.start_test{
margin: 80px 90px 0 86px
}
.start_title{
font-size: 26px;
color: #333;
text-align: left;
margin-bottom: 26px;
}
.start_content{
font-size: 18px;
color: #666;
text-align: left;
line-height: 20px;
}
.start_content>>> img{
width: auto;
margin: 0 auto
}
.start_btn{
width: 200px;
height: 38px;
text-align: center;
line-height: 38px;
background-color: #526AA6;
color: #fff;
font-size: 20px;
border-radius: 3px;
margin: 120px auto 0;
}
.start_btn:hover{
opacity: 0.8
}
</style>
\ No newline at end of file
... ...
<template>
<div class="login_wrap layout align_center justify_center">
<div class="login_box">
<div class="login_main">
<!-- logo -->
<div class="login_logo">
<img src="@/assets/img_41.png" alt />
</div>
<!-- 名称 -->
<div class="web_name">
全球移民与置业评估系统
<!-- International Immigration &
<br />Asset Allocation Assessed System -->
</div>
<!-- 账号输入 -->
<div class="login_input">
<el-input type="text" v-model="account" placeholder="输入用户名"></el-input>
<div class="input_icon">
<img src="@/assets/img_45.png" alt />
</div>
</div>
<!-- 密码输入 -->
<div class="login_input">
<el-input type="password" v-model="pwd" placeholder="输入密码"></el-input>
<div class="input_icon">
<img src="@/assets/img_43.png" alt />
</div>
</div>
<!-- 图形验证码 -->
<div class="verification_input layout align_center justify">
<div class="verification_input_l">
<el-input maxlength="4" type="text" v-model="code" placeholder="输入验证码"></el-input>
<div class="input_icon">
<img src="@/assets/img_44.png" alt />
</div>
</div>
<!-- 验证码 -->
<div class="verification_code" @click="getPicCode()">
<img :src="imgCode" alt />
</div>
</div>
<!-- 记住密码 -->
<div class="layout align_center justify_start remeber_pwd">
<el-checkbox v-model="checked" @change="changeCheck()">记住密码</el-checkbox>
</div>
<!-- 登录按钮 -->
<div class="login_btn" @click="toIndex()">登录</div>
</div>
</div>
</div>
</template>
<script>
import { post } from "../../api/http.js";
import { Message } from "element-ui";
export default {
data() {
return {
account: "",
pwd: "",
code: "",
checked: false,
imgCode: "",
sessionId: ""
};
},
methods: {
// 记住密码
changeCheck() {
if (this.checked) {
localStorage.setItem("account", this.account);
localStorage.setItem("pwd", this.pwd);
localStorage.setItem("checked", 1);
} else {
localStorage.removeItem("checked");
localStorage.removeItem("account");
localStorage.removeItem("pwd");
}
},
// 登录
toIndex() {
let url = "/api/user/login";
if(this.account&&this.pwd&&this.code){
if(localStorage.getItem("checked") == 1){
localStorage.setItem("account", this.account);
localStorage.setItem("pwd", this.pwd);
}
let params = {
username: this.account,
password: this.pwd,
code: this.code,
session_id: this.sessionId
};
post(url, params)
.then(res => {
localStorage.setItem("token", res.token);
this.$router.push({ path: "/index" });
})
.catch(err => {
this.code = "";
this.getPicCode();
});
}else{
this.$message({
showClose: true,
message: "请输入完整信息",
type: "warning"
});
}
},
// 获取图形验证码
getPicCode() {
let url = "/api/user/get_verify";
post(url).then(res => {
this.imgCode = res.get_code;
this.sessionId = res.session_id;
});
}
},
mounted() {
this.getPicCode();
this.account = localStorage.getItem("account");
this.pwd = localStorage.getItem("pwd");
if (localStorage.getItem("checked")) {
this.checked = true;
}
}
};
</script>
<style>
.login_input .el-input__inner {
background-color: rgba(0, 0, 0, 0);
color: #fff !important;
padding: 0 20px;
caret-color: #fff;
}
.login_input .el-input__inner::placeholder,
.verification_input_l .el-input__inner::placeholder {
color: #fff !important;
}
.verification_input_l .el-input__inner {
background-color: rgba(0, 0, 0, 0);
color: #fff !important;
padding: 0 20px;
caret-color: #fff;
}
.remeber_pwd .el-checkbox {
color: #fff;
font-size: 14px;
}
.remeber_pwd .el-checkbox__inner {
border-radius: 3px;
border: 1px solid #f9f9f9;
background-color: rgba(0, 0, 0, 0);
}
.remeber_pwd .el-checkbox__input.is-focus .el-checkbox__inner {
border-color: #f9f9f9;
}
.remeber_pwd .el-checkbox__input.is-checked .el-checkbox__inner,
.remeber_pwd .el-checkbox__input.is-indeterminate .el-checkbox__inner {
background-color: rgba(0, 0, 0, 0);
border-color: #f9f9f9;
}
.remeber_pwd .el-checkbox__input.is-checked + .el-checkbox__label {
color: #fff;
}
</style>
<style scoped>
.login_wrap {
width: 100%;
height: 100vh;
background-image: url("../../assets/img_42.png");
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: 0 0;
}
.login_box {
width: 540px;
height: 620px;
background-color: rgba(0, 0, 0, 0.2);
border-radius: 5px;
}
.login_main {
margin: 0 70px;
padding: 40px 0 60px;
}
/* 头像 */
.login_logo {
width: 106px;
margin: 0 auto;
}
/* 名称 */
.web_name {
font-size: 24px;
color: #fff;
text-align: center;
margin-top: 20px;
margin-bottom: 56px;
}
/* 输入框 */
.login_input {
border: 1px solid #f9f9f9;
border-radius: 3px;
position: relative;
margin-bottom: 36px;
}
.input_icon {
position: absolute;
right: 20px;
top: 50%;
width: 16px;
transform: translateY(-50%);
-o-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-webkit-transform: translateY(-50%);
}
/* 图形验证码 */
.verification_input_l {
width: 254px;
border: 1px solid #f9f9f9;
border-radius: 3px;
position: relative;
}
.verification_code {
width: 126px;
height: 42px;
border-radius: 3px;
background-color: #fff;
}
/* 记住密码 */
.remeber_pwd {
padding-left: 10px;
margin: 20px 0;
}
/* 登录按钮 */
.login_btn {
width: 100%;
height: 38px;
background-color: #526aa6;
border-radius: 3px;
text-align: center;
line-height: 38px;
color: #fff;
font-size: 18px;
}
</style>
\ No newline at end of file
... ...
<template>
<div class="index_wrap">
<Top :activeIndex="activeIndex" ref="mychild"></Top>
<!-- 个人信息 -->
<div class="personal_msg">
<!-- 主体 -->
<div class="main layout align_center justify_center">
<!-- 个人信息内容 -->
<div>
<!-- 头像 -->
<div class="avatar_wrap layout flex_row">
<div class="avatar_box layout align_center justify_center">
<img :src="imageUrl" alt />
</div>
<!-- 姓名 -->
<div class="name_wrap layout justify_around align_left flex_diection">
<div class="name_box">
{{name}}
<div class="line_bot">
<img src="@/assets/img_20.png" alt />
</div>
</div>
<div class="upload_avatar">
<!-- 上传头像 -->
<el-upload
class="avatar-uploader layout align_center flex_row justify_start"
action="http://yiminadmin.zishike.cn/api/common/upload"
:headers="headers"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
>
<!-- <el-upload
class="avatar-uploader layout align_center flex_row justify_start"
action="http://yiminadmin.zishike.com/api/common/upload"
:headers="headers"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
> -->
<!-- http://yiminadmin.zishike.com -->
<div class="upload_box layout justify align_center">
<div class="camera">
<img src="@/assets/img_31.png" alt />
</div>
<div class="upload_word">修改头像</div>
</div>
</el-upload>
<div class="upload_tips">* 支持JPG, PNG, BMP格式,大小不超过10M。</div>
</div>
</div>
</div>
<!-- 信息内容 -->
<div class="msg_content">
<div class="msg_single layout align_center flex_row justify_start">
<div class="msg_l">员工ID:</div>
<div class="msg_r">{{number}}</div>
</div>
<div class="msg_single layout align_center flex_row justify_start">
<div class="msg_l">手机号:</div>
<div class="msg_r">{{userName}}</div>
</div>
<div class="msg_single layout align_center flex_row justify_start">
<div class="msg_l">邮箱:</div>
<div class="msg_r" v-if="!isEditor">{{email}}</div>
<!-- 编辑 -->
<el-input class="email_input" v-model="email" v-else></el-input>
</div>
<div class="msg_single layout align_center flex_row justify_start">
<div class="msg_l">业务部门:</div>
<div class="msg_r">{{operatName}}</div>
</div>
</div>
<!-- 编辑按钮 -->
<div
class="editor_btn layout align_center flex_row justify_center"
@click="editorMsg()"
v-if="!isEditor"
>
<div>
<img src="@/assets/img_4.png" alt />
</div>
<div class="editor_word">编辑资料</div>
</div>
<!-- 编辑完成 提交按钮 -->
<div class="submit_btn layout align_center flex_row justify_around" v-else>
<div class="confirm_btn" @click="submit()">确定</div>
<div class="cancel_btn" @click="cancel()">取消</div>
</div>
</div>
</div>
</div>
<Bottom></Bottom>
</div>
</template>
<script>
import Top from "../../common/top";
import Bottom from "../../common/bottom";
import { Message } from "element-ui";
import { post } from "../../../api/http.js";
export default {
data() {
return {
activeIndex: 3,
// 头像
avatarUrl: "",
// 姓名
name: "",
// 编号
number: "",
// 联系方式
userName: "",
// 邮箱
email: "",
// 部门
operatName: "",
isEditor: false,
imageUrl: "",
headers: {
token: ""
},
gender:"",
chuanurl:''
};
},
methods: {
// 编辑信息
editorMsg() {
this.isEditor = true;
},
// 提交按钮
submit() {
if (
/^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(this.email)
) {
let url = "/api/user/update";
let params = {
avatar: this.chuanurl,
email: this.email
};
post(url, params).then(res => {
this.$refs.mychild.getUserInfor();
this.$message({
showClose: true,
message: "Modified success",
type: "success"
});
this.isEditor = false;
});
} else {
this.$message({
showClose: true,
message: "Please enter the correct email",
type: "warning"
});
}
},
// 撤销按钮
cancel() {
this.isEditor = false;
},
// 上传头像成功
handleAvatarSuccess(res, file) {
console.log(res,34893843894389)
this.avatarUrl = res.data.url;
this.chuanurl=res.data.relative_url
this.imageUrl = URL.createObjectURL(file.raw);
localStorage.setItem("avatar", this.avatarUrl);
let url = "/api/user/update";
let params = {
avatar: this.chuanurl,
email: this.email
};
post(url, params).then(res => {
this.$refs.mychild.getUserInfor();
this.$message({
showClose: true,
message: "Modified success",
type: "success"
});
this.isEditor = false;
});
},
beforeAvatarUpload(file) {
const isJPG =
file.type === "image/jpeg" ||
file.type === "image/png" ||
file.type === "image/bmp";
const isLt10M = file.size / 1024 / 1024 < 10;
if (!isJPG) {
this.$message.error("上传头像图片只能是 JPG、PNG、BMP 格式!");
}
if (!isLt10M) {
this.$message.error("上传头像图片大小不能超过 10MB!");
}
return isJPG && isLt10M;
},
// 获取个人信息
getUserInfor() {
let url = "/api/user/member";
post(url).then(res => {
this.imageUrl = res.avatar;
this.name = res.name;
this.number = res.number;
this.userName = res.username;
this.gender=res.gender;
this.email = res.email;
this.operatName = res.department_name;
});
}
},
components: {
Top,
Bottom
},
mounted() {
this.getUserInfor();
// this.imageUrl = localStorage.getItem("avatar");
// console.log(this.imageUrl)
this.headers.token = localStorage.getItem("token");
}
};
</script>
<style scoped>
.main {
width: 1200px;
margin: 28px auto;
height: 940px;
box-shadow: #ccc 0px 0px 5px;
}
/* 头像 */
.avatar_box {
width: 264px;
height: 264px;
border-radius: 50%;
border: 1px solid #e5e5e5;
}
.avatar_box img {
width: 228px;
height: 228px;
border-radius: 50%;
}
/* 姓名 */
.name_wrap {
margin-left: 40px;
}
.name_box {
color: #526aa6;
font-size: 24px;
text-align: left;
}
.line_bot {
width: 290px;
margin-top: 3px;
}
/* 上传头像提示 */
/* 上传按钮 */
.upload_box {
width: 145px;
height: 46px;
background: linear-gradient(
102deg,
rgba(37, 123, 251, 1),
rgba(0, 229, 199, 1)
);
border-radius: 3px;
margin-bottom: 13px;
}
.upload_box:hover {
opacity: 0.8;
}
.camera {
width: 28px;
margin-left: 14px;
}
.upload_word {
font-size: 18px;
color: #fefefe;
margin-right: 14px;
}
.upload_tips {
color: #999;
font-size: 14px;
}
/* 信息内容 */
.msg_content {
margin: 60px 0;
}
.msg_single {
margin-bottom: 35px;
margin-left: 130px;
}
.msg_l {
width: 200px;
color: #333;
font-size: 20px;
font-weight: bold;
text-align: left;
}
.msg_r {
color: #666;
font-size: 20px;
text-align: left;
}
.email_input {
width: 300px;
font-size: 20px;
}
/* 编辑按钮 */
.editor_btn {
width: 185px;
height: 46px;
background: linear-gradient(
102deg,
rgba(37, 123, 251, 1),
rgba(0, 229, 199, 1)
);
border-radius: 3px;
margin: 100px auto 0;
color: #fefefe;
font-size: 18px;
}
.editor_btn:hover {
opacity: 0.8;
}
.editor_word {
margin-left: 20px;
}
/* 提交按钮 */
.submit_btn {
margin-top: 100px;
}
.confirm_btn {
width: 185px;
height: 46px;
background: linear-gradient(
102deg,
rgba(37, 123, 251, 1),
rgba(0, 229, 199, 1)
);
border-radius: 3px;
color: #fefefe;
font-size: 18px;
text-align: center;
line-height: 46px;
}
.confirm_btn:hover {
opacity: 0.8;
}
.cancel_btn {
width: 183px;
height: 44px;
border: 1px solid #999;
text-align: center;
line-height: 46px;
color: #666;
font-size: 18px;
border-radius: 3px;
}
.cancel_btn:hover {
border-color: #526aa6;
opacity: 0.8;
}
</style>
\ No newline at end of file
... ...