确定合同功能模式
This commit is contained in:
@ -1,85 +1,59 @@
|
||||
<template>
|
||||
<div class="dashboard-editor-container">
|
||||
|
||||
<panel-group @handleSetLineChartData="handleSetLineChartData"/>
|
||||
|
||||
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
|
||||
<line-chart :chart-data="lineChartData"/>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row :gutter="32">-->
|
||||
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
|
||||
<!-- <div class="chart-wrapper">-->
|
||||
<!-- <raddar-chart />-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
|
||||
<!-- <div class="chart-wrapper">-->
|
||||
<!-- <pie-chart />-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
|
||||
<!-- <div class="chart-wrapper">-->
|
||||
<!-- <bar-chart />-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
|
||||
<div v-if="show">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入客户姓名"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入电话"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PanelGroup from '@/views/dashboard/PanelGroup'
|
||||
import LineChart from '@/views/dashboard/LineChart'
|
||||
import RaddarChart from '@/views/dashboard/RaddarChart'
|
||||
import PieChart from '@/views/dashboard/PieChart'
|
||||
import BarChart from '@/views/dashboard/BarChart'
|
||||
import Base64 from 'base-64';
|
||||
|
||||
const lineChartData = {
|
||||
newVisitis: {
|
||||
expectedData: [100, 120, 161, 134, 105, 160, 165],
|
||||
actualData: [120, 82, 91, 154, 162, 140, 145]
|
||||
},
|
||||
messages: {
|
||||
expectedData: [200, 192, 120, 144, 160, 130, 140],
|
||||
actualData: [180, 160, 151, 106, 145, 150, 130]
|
||||
},
|
||||
purchases: {
|
||||
expectedData: [80, 100, 121, 104, 105, 90, 100],
|
||||
actualData: [120, 90, 100, 138, 142, 130, 130]
|
||||
},
|
||||
shoppings: {
|
||||
expectedData: [130, 140, 141, 142, 145, 150, 160],
|
||||
actualData: [120, 82, 91, 154, 162, 140, 130]
|
||||
}
|
||||
}
|
||||
|
||||
let params = window.location.search.substring(1);
|
||||
if(params){
|
||||
params = Base64.decode( window.location.search.substring(1))
|
||||
params = this.searchToParams((params));
|
||||
}
|
||||
console.log(params)
|
||||
import {getFile} from "@/api/custom/contract";
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
components: {
|
||||
PanelGroup,
|
||||
LineChart,
|
||||
RaddarChart,
|
||||
PieChart,
|
||||
BarChart
|
||||
},
|
||||
name: 'sign',
|
||||
data() {
|
||||
return {
|
||||
lineChartData: lineChartData.newVisitis
|
||||
show: false,
|
||||
form: {},
|
||||
rules: {
|
||||
name: [
|
||||
{required: true, message: "姓名不能为空", trigger: "blur"}
|
||||
],
|
||||
phone: [
|
||||
{required: true, message: "电话不能为空", trigger: "blur"}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getContract();
|
||||
},
|
||||
methods: {
|
||||
handleSetLineChartData(type) {
|
||||
this.lineChartData = lineChartData[type]
|
||||
getContract() {
|
||||
const {pathname} = window.location;
|
||||
const id = pathname.substring(pathname.lastIndexOf('/') + 1);
|
||||
console.log(id)
|
||||
getFile(id).then(result => {
|
||||
if (result.url) {
|
||||
this.$router.push(result.url);
|
||||
} else if (result.data) {
|
||||
this.show = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.$emit('handleOnSubmit', this.form);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
41
ruoyi-ui/src/views/custom/signContract/signView/index.vue
Normal file
41
ruoyi-ui/src/views/custom/signContract/signView/index.vue
Normal file
@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入客户姓名"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入电话"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'signContract',
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
rules: {
|
||||
name: [
|
||||
{required: true, message: "姓名不能为空", trigger: "blur"}
|
||||
],
|
||||
phone: [
|
||||
{required: true, message: "电话不能为空", trigger: "blur"}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.$emit('handleOnSubmit', this.form);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Reference in New Issue
Block a user