|
@@ -2,25 +2,26 @@
|
|
|
<div class="ValidationTemplate">
|
|
|
<div class="ValidationTemplate1">
|
|
|
<div class="ValidationTemplate1-L">
|
|
|
- <el-button type="primary" icon="el-icon-plus" @click="dialog1=true">新增模板</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-plus" @click="Newtemp">新增模板</el-button>
|
|
|
</div>
|
|
|
<div class="ValidationTemplate1-R">
|
|
|
<div class="ValidationTemplate1-Rtx">
|
|
|
搜索:
|
|
|
</div>
|
|
|
- <el-input v-model="page.name" placeholder="请输入模板名称" @keyup.enter.native="search" clearable></el-input>
|
|
|
+ <el-input v-model="pages.T_name" placeholder="请输入模板名称" @keyup.enter.native="search" clearable>
|
|
|
+ </el-input>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="ValidationTemplate2">
|
|
|
<el-table :data="tableData" border size="small">
|
|
|
<el-table-column label="模板名称" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.date }}</span>
|
|
|
+ <span>{{ scope.row.T_name }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="模板排序" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.name }}
|
|
|
+ {{ scope.row.T_sort }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作">
|
|
@@ -37,73 +38,58 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<div class="ValidationTemplate3">
|
|
|
- <el-pagination @current-change="handleCurrentChange" :current-page="page.pagez" :page-size="page.page_size"
|
|
|
+ <el-pagination @current-change="handleCurrentChange" :current-page="pages.page" :page-size="pages.page_z"
|
|
|
layout="total, prev, pager, next, jumper" :total="total">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
- <el-drawer title="新增模板" :visible.sync="dialog1" direction="rtl" :wrapperClosable="false" ref="drawer">
|
|
|
+ <el-drawer :title="tit" :visible.sync="dialog1" direction="rtl" ref="drawer">
|
|
|
<div class="demo-drawers">
|
|
|
- <el-form :model="form">
|
|
|
- <el-form-item label="模板名称" :label-width="LabelWidth">
|
|
|
- <el-input v-model="form.name" autocomplete="off"></el-input>
|
|
|
+ <el-form :model="form" :rules="rules" ref="ruleForm">
|
|
|
+ <el-form-item label="模板名称" :label-width="LabelWidth" prop="T_name">
|
|
|
+ <el-input v-model="form.T_name" autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item :label-width="LabelWidth">
|
|
|
- <el-button type="primary" @click="$refs.drawer.closeDrawer()">
|
|
|
- 确 定
|
|
|
- </el-button>
|
|
|
- <el-button @click="dialog1=false">取 消</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
- </el-drawer>
|
|
|
- <el-drawer title="编辑模板" :visible.sync="dialog2" direction="rtl" :wrapperClosable="false" ref="drawer">
|
|
|
- <div class="demo-drawers">
|
|
|
- <el-form :model="form">
|
|
|
- <el-form-item label="模板名称" :label-width="LabelWidth">
|
|
|
- <el-input v-model="form.name" autocomplete="off"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="模板序号" :label-width="LabelWidth">
|
|
|
- <el-input v-model="form.name" autocomplete="off"></el-input>
|
|
|
+ <el-form-item label="模板序号" :label-width="LabelWidth" prop="T_sort">
|
|
|
+ <el-input v-model="form.T_sort" autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item :label-width="LabelWidth">
|
|
|
- <el-button type="primary" @click="$refs.drawer.closeDrawer()">
|
|
|
+ <el-button type="primary" @click="submitForm('ruleForm')">
|
|
|
确 定
|
|
|
</el-button>
|
|
|
- <el-button @click="dialog2=false">取 消</el-button>
|
|
|
+ <el-button @click="dialog1=false">取 消</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
- <el-drawer title="标签列表" :visible.sync="Drawer" direction="rtl" :wrapperClosable="false" ref="drawer" size="90%">
|
|
|
+ <el-drawer title="标签列表" :visible.sync="Drawer" direction="rtl" ref="drawer" size="90%">
|
|
|
<div class="demo-drawers">
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="NewinnerDrawer">添加标签</el-button>
|
|
|
<div style="margin-top: 10px;">
|
|
|
- <el-table :data="tableData" border size="small">
|
|
|
- <el-table-column label="标签名称" width="180">
|
|
|
+ <el-table :data="tableData1" border size="mini">
|
|
|
+ <el-table-column label="标签名称" width="300" :show-overflow-tooltip="true">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.date }}</span>
|
|
|
+ <span>{{ scope.row.T_name }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="数据类型" width="180">
|
|
|
+ <el-table-column label="数据类型" width="80" :show-overflow-tooltip="true">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.date }}</span>
|
|
|
+ <span>{{ scope.row.T_source }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="标签" width="180">
|
|
|
+ <el-table-column label="标签" width="150" :show-overflow-tooltip="true">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.date }}</span>
|
|
|
+ <span>{{ scope.row.T_field }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="排序" width="180">
|
|
|
+ <el-table-column label="排序" width="80" :show-overflow-tooltip="true">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.date }}</span>
|
|
|
+ <span>{{ scope.row.T_sort }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-dropdown @command="commands">
|
|
|
+ <el-dropdown @command="commands($event,scope.row)">
|
|
|
<div class="el-dropdown-link dropdown-links" style="">
|
|
|
- <el-button type="primary" plain size="small">更多操作</el-button>
|
|
|
+ <el-button type="primary" plain size="mini">更多操作</el-button>
|
|
|
</div>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item command="a">编辑</el-dropdown-item>
|
|
@@ -116,8 +102,8 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<div style="margin-top: 10px;">
|
|
|
- <el-pagination @current-change="handleCurrentChange111" :current-page="page1.pagez"
|
|
|
- :page-size="page1.page_size" layout="total, prev, pager, next, jumper" :total="total">
|
|
|
+ <el-pagination @current-change="handleCurrentChange111" :current-page="pages2.page"
|
|
|
+ :page-size="pages2.page_z" layout="total, prev, pager, next, jumper" :total="total1">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
<el-drawer title="时间流程" :append-to-body="true" :visible.sync="innerDrawer1" size="70%">
|
|
@@ -204,41 +190,48 @@
|
|
|
<el-drawer :title="titles" :append-to-body="true" :visible.sync="innerDrawer2">
|
|
|
<!-- 时间流程按钮后的编辑 -->
|
|
|
<div style="padding: 20px;">
|
|
|
- <el-form :model="form">
|
|
|
- <el-form-item label="数据类型" label-width="70px">
|
|
|
- <el-select v-model="form.region" placeholder="请选择活动区域">
|
|
|
- <el-option label="区域一" value="shanghai"></el-option>
|
|
|
- <el-option label="区域二" value="beijing"></el-option>
|
|
|
+ <el-form :model="form1" :rules="rules1" ref="ruleForm1">
|
|
|
+ <el-form-item label="数据类型" label-width="80px" prop="T_label">
|
|
|
+ <el-select v-model="form1.T_label" placeholder="请选择数据类型">
|
|
|
+ <el-option label="文本" value="1"></el-option>
|
|
|
+ <el-option label="数值" value="2"></el-option>
|
|
|
+ <el-option label="设备多选" value="3"></el-option>
|
|
|
+ <el-option label="设备单选" value="4"></el-option>
|
|
|
+ <el-option label="当期时间(2022年01月19日)" value="7"></el-option>
|
|
|
+ <el-option label="当期时间(开始与结束时间)" value="9"></el-option>
|
|
|
+ <el-option label="图片" value="10"></el-option>
|
|
|
+ <el-option label="CAD" value="11"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="来源" label-width="70px">
|
|
|
- <el-select v-model="form.region" placeholder="请选择活动区域">
|
|
|
- <el-option label="区域一" value="shanghai"></el-option>
|
|
|
- <el-option label="区域二" value="beijing"></el-option>
|
|
|
+ <el-form-item label="来源" label-width="80px" prop="T_source">
|
|
|
+ <el-select v-model="form1.T_source" placeholder="请选择来源">
|
|
|
+ <el-option label="所有" value="0"></el-option>
|
|
|
+ <el-option label="方案" value="1"></el-option>
|
|
|
+ <el-option label="报告" value="2"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="标签名称" label-width="70px">
|
|
|
- <el-input v-model="form.name" autocomplete="off"></el-input>
|
|
|
+ <el-form-item label="标签名称" label-width="80px" prop="T_name">
|
|
|
+ <el-input v-model="form1.T_name" autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="标签" label-width="70px">
|
|
|
- <el-input v-model="form.name" autocomplete="off"></el-input>
|
|
|
+ <el-form-item label="标签" label-width="80px" prop="T_field">
|
|
|
+ <el-input v-model="form1.T_field" autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="排序" label-width="70px">
|
|
|
- <el-input v-model="form.name" autocomplete="off"></el-input>
|
|
|
+ <el-form-item label="排序" label-width="80px" prop="T_sort">
|
|
|
+ <el-input v-model="form1.T_sort" autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="描述" label-width="70px">
|
|
|
- <el-input type="textarea" v-model="form.name"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="上传" label-width="70px">
|
|
|
- <el-upload class="upload-demo" drag action="https://jsonplaceholder.typicode.com/posts/"
|
|
|
- multiple>
|
|
|
- <i class="el-icon-upload"></i>
|
|
|
- <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
- <div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
|
- </el-upload>
|
|
|
+ <el-form-item label="上传" label-width="80px" prop="T_text">
|
|
|
+ <flies @pdfvalue="fliValue"></flies>
|
|
|
+ <div style="margin-top: 5px;">
|
|
|
+ <div v-if="form1.T_text!=''" style="height: 20px;color: #409EFF;display: flex;align-items: center;">
|
|
|
+ <i class="el-icon-circle-check"></i><span style="font-size: 12px;padding-left: 1px;">已经上传文件,点击虚线框内可更换</span>
|
|
|
+ </div>
|
|
|
+ <div v-else style="height: 20px;color: #C0C4CC;display: flex;align-items: center;">
|
|
|
+ <i class="el-icon-circle-close"></i><span style="font-size: 12px;padding-left: 1px;">还未上传文件,点击虚线框内可上传</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label-width="70px">
|
|
|
- <el-button type="primary" @click="innerDrawer2=false">
|
|
|
+ <el-form-item label-width="80px">
|
|
|
+ <el-button type="primary" @click="submitForm1('ruleForm1')">
|
|
|
确 定
|
|
|
</el-button>
|
|
|
<el-button @click="innerDrawer2=false">取 消</el-button>
|
|
@@ -252,54 +245,229 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {
|
|
|
+ TempGet,
|
|
|
+ TempAdd,
|
|
|
+ TempUp,TempDel,Map_List,Map_Add,Map_Up,Map_Del
|
|
|
+ } from '@/api/ReportViewing'
|
|
|
+ import flies from "@/components/files.vue"
|
|
|
export default {
|
|
|
name: 'ValidationTemplate',
|
|
|
+ components: {
|
|
|
+ flies
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
- LabelWidth: "70px",
|
|
|
- form: {
|
|
|
- name: '',
|
|
|
- region: '',
|
|
|
- paw: '',
|
|
|
+ LabelWidth: "80px",
|
|
|
+ form: { //新增编辑的提交参数
|
|
|
+ T_name: '',
|
|
|
+ T_sort: null
|
|
|
+ },
|
|
|
+ rules: {
|
|
|
+ T_name: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入模板名称',
|
|
|
+ trigger: 'blur'
|
|
|
+ }, ],
|
|
|
+ T_sort: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入模板序号',
|
|
|
+ trigger: 'blur'
|
|
|
+ }],
|
|
|
+ },
|
|
|
+ form1: { //新增编辑的提交参数
|
|
|
+ T_source: '',//来源 0-所有 1-方案 2-报告
|
|
|
+ T_label: '',//数据类型
|
|
|
+ T_name: '',//标签名称
|
|
|
+ T_field: '',//标签
|
|
|
+ T_text: '',//描述图片路径
|
|
|
+ T_sort: '',//排序
|
|
|
+ },
|
|
|
+ rules1: {
|
|
|
+ T_source: [{
|
|
|
+ required: true,
|
|
|
+ message: '请选择来源',
|
|
|
+ trigger: 'blur'
|
|
|
+ }, ],
|
|
|
+ T_label: [{
|
|
|
+ required: true,
|
|
|
+ message: '请选择数据类型',
|
|
|
+ trigger: 'blur'
|
|
|
+ }],
|
|
|
+ T_name: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入标签名称',
|
|
|
+ trigger: 'blur'
|
|
|
+ }, ],
|
|
|
+ T_field: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入标签',
|
|
|
+ trigger: 'blur'
|
|
|
+ }],
|
|
|
+ T_text: [{
|
|
|
+ required: true,
|
|
|
+ message: '请上传资源文件',
|
|
|
+ trigger: 'blur'
|
|
|
+ }, ],
|
|
|
+ T_sort: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入排序',
|
|
|
+ trigger: 'blur'
|
|
|
+ }],
|
|
|
},
|
|
|
+
|
|
|
+ TempNum:0,//验证是点击新增还是点击的编辑
|
|
|
titles: '',
|
|
|
titles1: '',
|
|
|
Drawer: false, //标签
|
|
|
- dialog1: false, //新增
|
|
|
- dialog2: false, //编辑
|
|
|
+ dialog1: false, //新增/编辑
|
|
|
+ tit: '新增模板',
|
|
|
innerDrawer1: false, //时间流程
|
|
|
innerDrawer2: false, //时间流程界面的编辑新增
|
|
|
innerDrawer3: false, //时间流程新增
|
|
|
- total: 30,
|
|
|
- page: {
|
|
|
- pagez: 1,
|
|
|
- page_size: 10,
|
|
|
- name: ''
|
|
|
+
|
|
|
+ total: 0,
|
|
|
+ total1: 0,
|
|
|
+ pages: {
|
|
|
+ page: 1,
|
|
|
+ page_z: 10,
|
|
|
+ T_name: ''
|
|
|
+ },
|
|
|
+ pages2: {
|
|
|
+ page: 1,
|
|
|
+ page_z: 10,
|
|
|
+ T_VerifyTemplate_id: ''
|
|
|
},
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
page1: {
|
|
|
pagez: 1,
|
|
|
page_size: 10,
|
|
|
name: ''
|
|
|
},
|
|
|
- tableData: [{
|
|
|
- date: '冷库',
|
|
|
- name: '1',
|
|
|
- }, {
|
|
|
- date: '车载',
|
|
|
- name: '2',
|
|
|
- }, {
|
|
|
- date: 'A箱',
|
|
|
- name: '3',
|
|
|
- }, {
|
|
|
- date: 'A箱',
|
|
|
- name: '4',
|
|
|
- }, {
|
|
|
- date: 'B箱',
|
|
|
- name: '5',
|
|
|
- }],
|
|
|
+ tableData: [],
|
|
|
+ tableData1: [],
|
|
|
}
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ this.GetTempGetApi()
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ submitForm1(formName) {
|
|
|
+ this.$refs[formName].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ if(this.TempNum==1){//1是新增
|
|
|
+ console.log('新增',this.form1)
|
|
|
+ Map_Add(this.form1).then(res=>{
|
|
|
+ if(res.data.Code===200){
|
|
|
+ this.$message.success('新增成功')
|
|
|
+ this.innerDrawer2 = false
|
|
|
+ this.pages2.page = 1
|
|
|
+ this.GetMaplistApi()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{//2是编辑
|
|
|
+ Map_Up(this.form1).then(res=>{
|
|
|
+ if(res.data.Code===200){
|
|
|
+ this.$message.success('编辑成功')
|
|
|
+ this.innerDrawer2 = false
|
|
|
+ this.pages2.page = 1
|
|
|
+ this.GetMaplistApi()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log('编辑',this.form1)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ fliValue(e){//上传
|
|
|
+ console.log('上传',e)
|
|
|
+ this.form1.T_text = e
|
|
|
+ },
|
|
|
+ handleCurrentChange111(val) {
|
|
|
+ this.pages2.page = val
|
|
|
+ this.GetMaplistApi()
|
|
|
+ },
|
|
|
+ handlelabel(val) {
|
|
|
+ this.Drawer = true
|
|
|
+ this.pages2.T_VerifyTemplate_id = val.T_VerifyTemplate_id
|
|
|
+ this.GetMaplistApi()
|
|
|
+ },
|
|
|
+ GetMaplistApi(){
|
|
|
+ Map_List(this.pages2).then(res=>{
|
|
|
+ console.log('列那边',res)
|
|
|
+ if(res.data.Code==200){
|
|
|
+ this.tableData1 = res.data.Data.List
|
|
|
+ this.total1 = res.data.Data.Num
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ GetTempGetApi() {
|
|
|
+ TempGet(this.pages).then(res => {
|
|
|
+ console.log('列表', res)
|
|
|
+ if (res.data.Code === 200) {
|
|
|
+ this.tableData = res.data.Data.List
|
|
|
+ this.total = res.data.Data.Num
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ Newtemp() { //新增模板
|
|
|
+ if(this.$refs.ruleForm!=undefined){
|
|
|
+ this.$refs.ruleForm.clearValidate()
|
|
|
+ }
|
|
|
+ this.tit = '新增模板'
|
|
|
+ this.dialog1 = true
|
|
|
+ this.TempNum=1
|
|
|
+
|
|
|
+ this.form.T_name = ""
|
|
|
+ this.form.T_sort = ""
|
|
|
+ },
|
|
|
+ handleEdit(val) { //编辑模板
|
|
|
+ if(this.$refs.ruleForm!=undefined){
|
|
|
+ this.$refs.ruleForm.clearValidate()
|
|
|
+ }
|
|
|
+ this.form.T_name = val.T_name
|
|
|
+ this.form.T_sort = val.T_sort
|
|
|
+ this.form.T_VerifyTemplate_id = val.T_VerifyTemplate_id
|
|
|
+
|
|
|
+ this.tit = '编辑模板'
|
|
|
+ this.dialog1 = true
|
|
|
+ this.TempNum=2
|
|
|
+ console.log('编辑sss', val)
|
|
|
+ },
|
|
|
+ submitForm(formName) {
|
|
|
+ this.$refs[formName].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ if(this.TempNum==1){//1是新增
|
|
|
+ TempAdd(this.form).then(res=>{
|
|
|
+ if(res.data.Code==200){
|
|
|
+ this.dialog1 = false
|
|
|
+ this.pages.page = 1
|
|
|
+ this.GetTempGetApi()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{//2是编辑
|
|
|
+ TempUp(this.form).then(res=>{
|
|
|
+ if(res.data.Code==200){
|
|
|
+ this.dialog1 = false
|
|
|
+ this.pages.page = 1
|
|
|
+ this.GetTempGetApi()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ search() { //回车搜索
|
|
|
+ this.pages.page = 1
|
|
|
+ this.GetTempGetApi()
|
|
|
+ },
|
|
|
TimeEdit(e) {
|
|
|
console.log(e)
|
|
|
this.innerDrawer3 = true
|
|
@@ -329,30 +497,57 @@
|
|
|
});
|
|
|
},
|
|
|
NewinnerDrawer() {
|
|
|
+ if(this.$refs.ruleForm1!=undefined){
|
|
|
+ this.$refs.ruleForm1.clearValidate()
|
|
|
+ }
|
|
|
+ this.form1.T_source = ""
|
|
|
+ this.form1.T_label = ""
|
|
|
+ this.form1.T_name = ""
|
|
|
+ this.form1.T_field = ""
|
|
|
+ this.form1.T_text = ""
|
|
|
+ this.form1.T_sort = ""
|
|
|
+
|
|
|
+ this.form1.T_VerifyTemplate_id = this.pages2.T_VerifyTemplate_id
|
|
|
this.titles = '添加'
|
|
|
+ this.TempNum = 1
|
|
|
this.innerDrawer2 = true
|
|
|
},
|
|
|
- commands(e) {
|
|
|
- console.log(e)
|
|
|
+ commands(e,obj) {
|
|
|
+ console.log('嘻嘻嘻',e,obj)
|
|
|
+ var that = this
|
|
|
switch (e) {
|
|
|
case 'a':
|
|
|
- this.titles = '编辑'
|
|
|
- this.innerDrawer2 = true
|
|
|
+ that.titles = '编辑'
|
|
|
+ that.innerDrawer2 = true
|
|
|
+ that.TempNum = 2
|
|
|
+ if(that.$refs.ruleForm1!=undefined){
|
|
|
+ that.$refs.ruleForm1.clearValidate()
|
|
|
+ }
|
|
|
+ that.form1.T_source = JSON.stringify(obj.T_source)
|
|
|
+ that.form1.T_label = JSON.stringify(obj.T_label)
|
|
|
+ that.form1.T_name = obj.T_name
|
|
|
+ that.form1.T_field = obj.T_field
|
|
|
+ that.form1.T_text = obj.T_text
|
|
|
+ that.form1.T_sort = obj.T_sort
|
|
|
+ that.form1.T_id = obj.T_id
|
|
|
break
|
|
|
case 'b':
|
|
|
this.innerDrawer1 = true
|
|
|
break
|
|
|
default:
|
|
|
- this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
+ this.$confirm('此操作将永久删除该模板, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '立即删除',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning',
|
|
|
center: true
|
|
|
}).then(() => {
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: '删除成功!'
|
|
|
- });
|
|
|
+ Map_Del({T_id: obj.T_id}).then(res=>{
|
|
|
+ if(res.data.Code==200){
|
|
|
+ this.$message.success('删除成功!')
|
|
|
+ this.pages2.page = 1
|
|
|
+ this.GetMaplistApi()
|
|
|
+ }
|
|
|
+ })
|
|
|
}).catch(() => {
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
@@ -361,30 +556,21 @@
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- handleCurrentChange111(val) {
|
|
|
- this.page1.pagez = val
|
|
|
- console.log('当前页', this.page);
|
|
|
- },
|
|
|
- handlelabel(val) {
|
|
|
- console.log('标签', val);
|
|
|
- this.Drawer = true
|
|
|
- },
|
|
|
- handleEdit(val) {
|
|
|
- this.dialog2 = true
|
|
|
- console.log('编辑', val);
|
|
|
- },
|
|
|
+
|
|
|
handleDelete(val) {
|
|
|
- console.log('删除', val);
|
|
|
- this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
|
|
|
+ this.$confirm('此操作将永久删除该模板, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning',
|
|
|
center: true
|
|
|
}).then(() => {
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: '删除成功!'
|
|
|
- });
|
|
|
+ TempDel({T_VerifyTemplate_id:val.T_VerifyTemplate_id}).then(res=>{
|
|
|
+ if(res.data.Code==200){
|
|
|
+ this.$message.success('删除成功!')
|
|
|
+ this.pages.page = 1
|
|
|
+ this.GetTempGetApi()
|
|
|
+ }
|
|
|
+ })
|
|
|
}).catch(() => {
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
@@ -393,8 +579,8 @@
|
|
|
});
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
- this.page.pagez = val
|
|
|
- console.log('当前页', this.page);
|
|
|
+ this.pages.page = val
|
|
|
+ this.GetTempGetApi()
|
|
|
},
|
|
|
}
|
|
|
}
|