Commit a6a4e272 authored by 黄奎's avatar 黄奎

代码优化

parent c25f6ace
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<q-table :pagination="pageMsg" :loading="loading" no-data-label="暂无相关数据" flat <q-table :pagination="pageMsg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-right-column-table" separator="none" :data="dataList" :columns="columns" class="sticky-column-table sticky-right-column-table" separator="none" :data="dataList" :columns="columns"
row-key="name"> row-key="name">
<template v-slot:top="props"> <template v-slot:top>
<div class="col-2 q-table__title">考试管理</div> <div class="col-2 q-table__title">考试管理</div>
<q-space /> <q-space />
</template> </template>
......
...@@ -8,15 +8,16 @@ ...@@ -8,15 +8,16 @@
<div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-12"> <div class="col-12">
<q-input @input="research" clearable standout="bg-primary text-white" v-model="msg.TemplateName" label="关键字" <q-input @input="research" clearable standout="bg-primary text-white" v-model="msg.TemplateName"
@clear="research" maxlength="20" /> label="关键字" @clear="research" maxlength="20" />
</div> </div>
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-header-column-table" style="max-height: 550px" separator="none" :data="dataList" :columns="columns" class="sticky-column-table sticky-header-column-table" style="max-height: 550px" separator="none"
row-key="TemplateId" selection="single" :selected.sync="selectedTemplate"> :data="dataList" :columns="columns" row-key="TemplateId" selection="single"
:selected.sync="selectedTemplate">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">模板列表</div> <div class="col-2 q-table__title">模板列表</div>
<q-space /> <q-space />
...@@ -70,7 +71,7 @@ ...@@ -70,7 +71,7 @@
field: 'TemplateName', field: 'TemplateName',
align: 'left', align: 'left',
}, },
{ {
name: 'GroupTypeName', name: 'GroupTypeName',
label: '组卷类型', label: '组卷类型',
field: 'GroupTypeName', field: 'GroupTypeName',
...@@ -131,15 +132,13 @@ ...@@ -131,15 +132,13 @@
this.persistent = false; this.persistent = false;
var tempObj = {}; var tempObj = {};
if (this.selectedTemplate && this.selectedTemplate.length > 0) { if (this.selectedTemplate && this.selectedTemplate.length > 0) {
tempObj=this.selectedTemplate[0]; tempObj = this.selectedTemplate[0];
} }
this.$emit('success', tempObj); this.$emit('success', tempObj);
}, },
}, },
} }
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style>
</style> \ No newline at end of file
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
position: relative; position: relative;
top: 4px; top: 4px;
} }
</style> </style>
<!--移动到文件夹--> <!--移动到文件夹-->
<template> <template>
...@@ -250,7 +249,6 @@ ...@@ -250,7 +249,6 @@
}, },
}, },
} }
</script> </script>
<style> <style>
</style> </style>
\ No newline at end of file
...@@ -96,7 +96,6 @@ ...@@ -96,7 +96,6 @@
}, },
}, },
} }
</script> </script>
<style> <style>
</style> </style>
\ No newline at end of file
...@@ -149,7 +149,6 @@ ...@@ -149,7 +149,6 @@
.processSet .justTwoClass { .processSet .justTwoClass {
margin-left: 8px; margin-left: 8px;
} }
</style> </style>
<template> <template>
<div class="processSet"> <div class="processSet">
...@@ -160,7 +159,7 @@ ...@@ -160,7 +159,7 @@
</div> </div>
</div> </div>
<template v-for="(item,index) in flowObj.FlowNodeList"> <template v-for="(item,index) in flowObj.FlowNodeList">
<div class="processList" @click="getItem(index)"> <div class="processList" @click="getItem(index)" :key="index">
<template v-if="item.FlowAduitList&&item.FlowAduitList.length==1"> <template v-if="item.FlowAduitList&&item.FlowAduitList.length==1">
<div class="processTop otherList"> <div class="processTop otherList">
{{item.FlowAduitList[0].AduitName}} {{item.FlowAduitList[0].AduitName}}
...@@ -215,7 +214,6 @@ ...@@ -215,7 +214,6 @@
<br /> <br />
<div class="addProcessBtn" @click="AddNode">新增节点</div> <div class="addProcessBtn" @click="AddNode">新增节点</div>
<div class="process_BtnList"> <div class="process_BtnList">
<!-- <div class="process_BtnOne">日志信息</div> -->
<q-btn label="保存" color="accent q-px-md" style="font-weight:400 !important" @click="setBackClassFlow" /> <q-btn label="保存" color="accent q-px-md" style="font-weight:400 !important" @click="setBackClassFlow" />
</div> </div>
<process-form v-if="isShowProcess" :save-obj="processObj" :NodeIndex="ChooseNodeIndex" @close="closeProcessForm" <process-form v-if="isShowProcess" :save-obj="processObj" :NodeIndex="ChooseNodeIndex" @close="closeProcessForm"
...@@ -351,5 +349,4 @@ ...@@ -351,5 +349,4 @@
} }
} }
} }
</script>
</script> \ No newline at end of file
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
</div> </div>
</div> </div>
<template v-for="(item,index) in flowObj.FlowNodeList"> <template v-for="(item,index) in flowObj.FlowNodeList">
<div class="processList" @click="getItem(index)"> <div class="processList" @click="getItem(index)" :key="index">
<template v-if="item.FlowAduitList&&item.FlowAduitList.length==1"> <template v-if="item.FlowAduitList&&item.FlowAduitList.length==1">
<div class="processTop otherList"> <div class="processTop otherList">
{{item.FlowAduitList[0].AduitName}} {{item.FlowAduitList[0].AduitName}}
......
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
</div> </div>
</div> </div>
<template v-for="(item, index) in flowObj.FlowNodeList"> <template v-for="(item, index) in flowObj.FlowNodeList">
<div class="processList" @click="getItem(index)"> <div class="processList" @click="getItem(index)" :key="index">
<template v-if="item.FlowAduitList && item.FlowAduitList.length == 1"> <template v-if="item.FlowAduitList && item.FlowAduitList.length == 1">
<div class="processTop otherList"> <div class="processTop otherList">
{{ item.FlowAduitList[0].AduitName }} {{ item.FlowAduitList[0].AduitName }}
......
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
<template> <template>
<q-dialog v-model="persistent" maximized full-height seamless position="right" @hide="closeProcess"> <q-dialog v-model="persistent" maximized full-height seamless position="right" @hide="closeProcess">
<q-card style="margin-top:61px;width:500px" class="no-border-radius classinfo_Dialog"> <q-card style="margin-top:61px;width:500px" class="no-border-radius classinfo_Dialog">
<div class="processMain" v-for="(aItem,aIndex) in saveObj.FlowNodeList[NodeIndex].FlowAduitList"> <div class="processMain" v-for="(aItem,aIndex) in saveObj.FlowNodeList[NodeIndex].FlowAduitList" :key="aIndex">
<div class="processShenPi"> <div class="processShenPi">
<div class="processPerson">审批人{{aIndex+1}}</div> <div class="processPerson">审批人{{aIndex+1}}</div>
<div class="processInner"> <div class="processInner">
......
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
</div> </div>
</div> </div>
<template v-for="(item,index) in flowObj.FlowNodeList"> <template v-for="(item,index) in flowObj.FlowNodeList">
<div class="processList" @click="getItem(index)"> <div class="processList" @click="getItem(index)" :key="index">
<template v-if="item.FlowAduitList&&item.FlowAduitList.length==1"> <template v-if="item.FlowAduitList&&item.FlowAduitList.length==1">
<div class="processTop otherList"> <div class="processTop otherList">
{{item.FlowAduitList[0].AduitName}} {{item.FlowAduitList[0].AduitName}}
......
...@@ -149,7 +149,6 @@ ...@@ -149,7 +149,6 @@
.changeClassProcess .justTwoClass { .changeClassProcess .justTwoClass {
margin-left: 8px; margin-left: 8px;
} }
</style> </style>
<template> <template>
<div class="changeClassProcess"> <div class="changeClassProcess">
...@@ -160,7 +159,7 @@ ...@@ -160,7 +159,7 @@
</div> </div>
</div> </div>
<template v-for="(item,index) in flowObj.FlowNodeList"> <template v-for="(item,index) in flowObj.FlowNodeList">
<div class="processList" @click="getItem(index)"> <div class="processList" @click="getItem(index)" :key="index">
<template v-if="item.FlowAduitList&&item.FlowAduitList.length==1"> <template v-if="item.FlowAduitList&&item.FlowAduitList.length==1">
<div class="processTop otherList"> <div class="processTop otherList">
{{item.FlowAduitList[0].AduitName}} {{item.FlowAduitList[0].AduitName}}
...@@ -215,7 +214,6 @@ ...@@ -215,7 +214,6 @@
<br /> <br />
<div class="addProcessBtn" @click="AddNode">新增节点</div> <div class="addProcessBtn" @click="AddNode">新增节点</div>
<div class="process_BtnList"> <div class="process_BtnList">
<q-btn label="保存" color="accent q-px-md" style="font-weight:400 !important" @click="setBackClassFlow" /> <q-btn label="保存" color="accent q-px-md" style="font-weight:400 !important" @click="setBackClassFlow" />
</div> </div>
<process-form v-if="isShowProcess" :save-obj="processObj" :NodeIndex="ChooseNodeIndex" @close="closeProcessForm" <process-form v-if="isShowProcess" :save-obj="processObj" :NodeIndex="ChooseNodeIndex" @close="closeProcessForm"
...@@ -250,7 +248,7 @@ ...@@ -250,7 +248,7 @@
}, },
//显示对象 //显示对象
showObj: { showObj: {
isShowShouSun: 0,//不显示收损 isShowShouSun: 0, //不显示收损
}, },
ChooseNodeIndex: 0, ChooseNodeIndex: 0,
} }
...@@ -351,5 +349,4 @@ ...@@ -351,5 +349,4 @@
} }
} }
} }
</script>
</script> \ No newline at end of file
...@@ -149,7 +149,6 @@ ...@@ -149,7 +149,6 @@
.changeClassProcess .justTwoClass { .changeClassProcess .justTwoClass {
margin-left: 8px; margin-left: 8px;
} }
</style> </style>
<template> <template>
<div class="changeClassProcess"> <div class="changeClassProcess">
...@@ -160,7 +159,7 @@ ...@@ -160,7 +159,7 @@
</div> </div>
</div> </div>
<template v-for="(item,index) in flowObj.FlowNodeList"> <template v-for="(item,index) in flowObj.FlowNodeList">
<div class="processList" @click="getItem(index)"> <div class="processList" @click="getItem(index)" :key="index">
<template v-if="item.FlowAduitList&&item.FlowAduitList.length==1"> <template v-if="item.FlowAduitList&&item.FlowAduitList.length==1">
<div class="processTop otherList"> <div class="processTop otherList">
{{item.FlowAduitList[0].AduitName}} {{item.FlowAduitList[0].AduitName}}
...@@ -250,7 +249,7 @@ ...@@ -250,7 +249,7 @@
}, },
//显示对象 //显示对象
showObj: { showObj: {
isShowShouSun: 0,//不显示收损 isShowShouSun: 0, //不显示收损
}, },
ChooseNodeIndex: 0, ChooseNodeIndex: 0,
} }
...@@ -351,5 +350,4 @@ ...@@ -351,5 +350,4 @@
} }
} }
} }
</script>
</script> \ No newline at end of file
This diff is collapsed.
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
</div> </div>
</div> </div>
<template v-for="(item,index) in flowObj.FlowNodeList"> <template v-for="(item,index) in flowObj.FlowNodeList">
<div class="processList" @click="getItem(index)"> <div class="processList" @click="getItem(index)" :key="index">
<template v-if="item.FlowAduitList&&item.FlowAduitList.length==1"> <template v-if="item.FlowAduitList&&item.FlowAduitList.length==1">
<div class="processTop otherList"> <div class="processTop otherList">
{{item.FlowAduitList[0].AduitName}} {{item.FlowAduitList[0].AduitName}}
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
font-size: 14px; font-size: 14px;
color: #646873; color: #646873;
line-height: 34px; line-height: 34px;
/* margin-bottom: 16px; */
overflow: hidden; overflow: hidden;
padding: 4px 0; padding: 4px 0;
cursor: default; cursor: default;
......
...@@ -16,29 +16,29 @@ ...@@ -16,29 +16,29 @@
color="red" icon="iconfont icon-guanbi1" /> color="red" icon="iconfont icon-guanbi1" />
</div> </div>
</div> </div>
<el-upload v-else class="avatar-uploader addDutyMain" action="" <el-upload v-else class="avatar-uploader addDutyMain" action="" :before-upload="uploadFile"
:before-upload="uploadFile" :show-file-list="false"> :show-file-list="false">
<i class="el-icon-plus avatar-uploader-icon"></i> <i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<q-input filled stack-label v-model="objOption.Path" ref="Path" <q-input filled stack-label v-model="objOption.Path" ref="Path" class="col-12 q-pb-lg"
class="col-12 q-pb-lg" :rules="[val => !!val || '请输入跳转路径']" label="跳转路径" /> :rules="[val => !!val || '请输入跳转路径']" label="跳转路径" />
</div> </div>
<div class="row"> <div class="row">
<q-input filled stack-label v-model.number="objOption.Sort" ref="Sort" <q-input filled stack-label v-model.number="objOption.Sort" ref="Sort" class="col-12 q-pb-lg"
class="col-12 q-pb-lg" :rules="[val => !!val || '请输入排序']" label="排序" /> :rules="[val => !!val || '请输入排序']" label="排序" />
</div> </div>
<div class="row"> <div class="row">
<q-input filled stack-label type="textarea" v-model.number="objOption.Remark" ref="SubjectName" <q-input filled stack-label type="textarea" v-model.number="objOption.Remark" ref="SubjectName"
class="col-12 q-pb-lg" label="描述" /> class="col-12 q-pb-lg" label="描述" />
</div> </div>
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeDig" /> <q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeDig" />
<q-btn label="保存" color="accent q-px-md" style="font-weight:400 !important" @click="save" /> <q-btn label="保存" color="accent q-px-md" style="font-weight:400 !important" @click="save" />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
...@@ -54,24 +54,24 @@ ...@@ -54,24 +54,24 @@
type: Object, type: Object,
default: null default: null
}, },
type:{ type: {
type:Number, type: Number,
default:0 default: 0
} }
}, },
data() { data() {
return { return {
persistent: true, persistent: true,
objOption: { objOption: {
Image:"", Image: "",
Path:"", Path: "",
Remark:"", Remark: "",
Sort:0 Sort: 0
} }
} }
}, },
mounted() { mounted() {
this.init() this.init()
}, },
methods: { methods: {
closeDig() { closeDig() {
...@@ -89,34 +89,33 @@ ...@@ -89,34 +89,33 @@
} }
}) })
}, },
init(){ init() {
this.objOption.Image=this.saveObj.Image this.objOption.Image = this.saveObj.Image
this.objOption.Path=this.saveObj.Path this.objOption.Path = this.saveObj.Path
this.objOption.Remark=this.saveObj.Remark this.objOption.Remark = this.saveObj.Remark
this.objOption.Sort=this.saveObj.Sort this.objOption.Sort = this.saveObj.Sort
}, },
save(){ save() {
if(!this.objOption.Image){ if (!this.objOption.Image) {
this.$q.notify({ this.$q.notify({
type :'warning', type: 'warning',
position :'top', position: 'top',
message :"请上传图片" message: "请上传图片"
}) })
return return
} }
this.$refs.Path.validate() this.$refs.Path.validate()
this.$refs.Sort.validate() this.$refs.Sort.validate()
if (!this.$refs.Path.hasError&&!this.$refs.Sort.hasError) { if (!this.$refs.Path.hasError && !this.$refs.Sort.hasError) {
this.persistent = false this.persistent = false
this.$emit('save',this.objOption) this.$emit('save', this.objOption)
} }
} }
} }
} }
</script> </script>
<style > <style>
.avatar-uploader .el-upload { .avatar-uploader .el-upload {
border-radius: 6px; border-radius: 6px;
cursor: pointer; cursor: pointer;
width: 100%; width: 100%;
...@@ -134,14 +133,16 @@ ...@@ -134,14 +133,16 @@
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
line-height: 120px; line-height: 120px;
} }
.ItemImgDiv {
.ItemImgDiv {
width: 118px; width: 118px;
height: 118px; height: 118px;
position: relative; position: relative;
margin: 0 10px 10px 0; margin: 0 10px 10px 0;
display: inline-block; display: inline-block;
} }
._delete_img {
._delete_img {
position: absolute; position: absolute;
top: 0px; top: 0px;
height: 82px; height: 82px;
......
...@@ -20,16 +20,18 @@ ...@@ -20,16 +20,18 @@
<div style="margin-bottom:5px;">咨询内容:</div> <div style="margin-bottom:5px;">咨询内容:</div>
</div> </div>
<div class="row wrap"> <div class="row wrap">
<q-input class="col-12 q-pb-lg" v-model="editObj.Remark" filled :disable="isEdit" type="textarea" placeholder="咨询内容" /> <q-input class="col-12 q-pb-lg" v-model="editObj.Remark" filled :disable="isEdit" type="textarea"
placeholder="咨询内容" />
<div style="margin-bottom:5px;">回复内容:</div> <div style="margin-bottom:5px;">回复内容:</div>
<q-input class="col-12 q-pb-lg" v-model="objOption.DealContent" :disable="isEdit" filled type="textarea" placeholder="回复内容" /> <q-input class="col-12 q-pb-lg" v-model="objOption.DealContent" :disable="isEdit" filled type="textarea"
placeholder="回复内容" />
</div> </div>
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeSaveForm" /> <q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeSaveForm" />
<q-btn label="立即提交" v-if="saveObj.isView!=1" color="accent q-px-md" style="font-weight:400 !important" :loading="saveLoading" <q-btn label="立即提交" v-if="saveObj.isView!=1" color="accent q-px-md" style="font-weight:400 !important"
@click="saveConsult" /> :loading="saveLoading" @click="saveConsult" />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
...@@ -58,13 +60,13 @@ ...@@ -58,13 +60,13 @@
editObj: {}, editObj: {},
optionTitle: "修改咨询", optionTitle: "修改咨询",
saveLoading: false, saveLoading: false,
isEdit:false isEdit: false
} }
}, },
mounted() { mounted() {
if(this.saveObj.isView==1){ if (this.saveObj.isView == 1) {
this.isEdit=true; this.isEdit = true;
this.optionTitle='查看咨询'; this.optionTitle = '查看咨询';
} }
this.initObj() this.initObj()
}, },
...@@ -112,5 +114,4 @@ ...@@ -112,5 +114,4 @@
} }
}, },
} }
</script>
</script> \ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment