Commit 9ec48978 by lanyulei Committed by GitHub

Merge pull request #27 from lanyulei/dev

feat: 优化工单申请页面
parents f72eb2d9 c95f4813
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
"core-js": "^2.6.11", "core-js": "^2.6.11",
"driver.js": "0.9.5", "driver.js": "0.9.5",
"dropzone": "5.5.1", "dropzone": "5.5.1",
"e-icon-picker": "^1.0.7",
"echarts": "^4.8.0", "echarts": "^4.8.0",
"element-ui": "2.11.1", "element-ui": "2.11.1",
"file-saver": "2.0.1", "file-saver": "2.0.1",
......
...@@ -37,6 +37,12 @@ Vue.use(VueCodeMirror) ...@@ -37,6 +37,12 @@ Vue.use(VueCodeMirror)
import VueEditor from 'vue2-editor' import VueEditor from 'vue2-editor'
Vue.use(VueEditor) Vue.use(VueEditor)
import iconPicker from 'e-icon-picker'
import 'e-icon-picker/dist/index.css'// 基础样式
import 'e-icon-picker/dist/main.css' // fontAwesome 图标库样式
Vue.use(iconPicker)
// 全局方法挂载 // 全局方法挂载
Vue.prototype.parseTime = parseTime Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm Vue.prototype.resetForm = resetForm
......
...@@ -87,9 +87,18 @@ ...@@ -87,9 +87,18 @@
<el-dialog :title="dialogProcessVisibleName===1?'新建流程':'编辑流程'" :visible.sync="open" :fullscreen="true" style="margin-top: 0"> <el-dialog :title="dialogProcessVisibleName===1?'新建流程':'编辑流程'" :visible.sync="open" :fullscreen="true" style="margin-top: 0">
<div class="tpl-create-content"> <div class="tpl-create-content">
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px"> <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="名称" prop="name"> <el-form-item label="名称" prop="name">
<el-input v-model="ruleForm.name" placeholder="请输入流程名称" style="width: 100%" /> <el-input v-model="ruleForm.name" placeholder="请输入流程名称" style="width: 100%" />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="图标" prop="icon">
<e-icon-picker v-model="ruleForm.icon" style="width: 100%" />
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="分类" prop="classify"> <el-form-item label="分类" prop="classify">
...@@ -137,6 +146,15 @@ ...@@ -137,6 +146,15 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="描述" prop="remarks">
<el-input
v-model="ruleForm.remarks"
placeholder="请输入流程描述"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
style="width: 100%"
/>
</el-form-item>
<el-form-item label="流程" prop="structure"> <el-form-item label="流程" prop="structure">
<div style="border-radius: 4px; overflow:hidden"> <div style="border-radius: 4px; overflow:hidden">
<div> <div>
...@@ -218,6 +236,9 @@ export default { ...@@ -218,6 +236,9 @@ export default {
lang: 'zh', lang: 'zh',
ruleForm: {}, ruleForm: {},
rules: { rules: {
icon: [
{ required: true, message: '请输入流程图标', trigger: 'blur' }
],
name: [ name: [
{ required: true, message: '请输入流程名称', trigger: 'blur' } { required: true, message: '请输入流程名称', trigger: 'blur' }
], ],
...@@ -229,6 +250,9 @@ export default { ...@@ -229,6 +250,9 @@ export default {
], ],
structure: [ structure: [
{ required: true, message: '请设计流程', trigger: 'blur' } { required: true, message: '请设计流程', trigger: 'blur' }
],
remarks: [
{ required: true, message: '请输入流程描述', trigger: 'blur' }
] ]
} }
} }
...@@ -309,7 +333,9 @@ export default { ...@@ -309,7 +333,9 @@ export default {
structure: { 'edges': [], 'nodes': [], 'groups': [] }, structure: { 'edges': [], 'nodes': [], 'groups': [] },
classify: '', classify: '',
task: [], task: [],
notice: [1] notice: [1],
icon: '',
remarks: ''
} }
this.dialogProcessVisibleName = 1 this.dialogProcessVisibleName = 1
this.open = true this.open = true
...@@ -332,7 +358,9 @@ export default { ...@@ -332,7 +358,9 @@ export default {
structure: response.data.structure, structure: response.data.structure,
classify: response.data.classify, classify: response.data.classify,
task: response.data.task, task: response.data.task,
notice: response.data.notice notice: response.data.notice,
icon: response.data.icon,
remarks: response.data.remarks
} }
this.open = true this.open = true
this.wfdDesignRefresh = false this.wfdDesignRefresh = false
...@@ -405,7 +433,9 @@ export default { ...@@ -405,7 +433,9 @@ export default {
structure: structureValue, structure: structureValue,
classify: this.ruleForm.classify, classify: this.ruleForm.classify,
task: this.ruleForm.task, task: this.ruleForm.task,
notice: this.ruleForm.notice notice: this.ruleForm.notice,
icon: this.ruleForm.icon,
remarks: this.ruleForm.remarks
}).then(response => { }).then(response => {
this.getList() this.getList()
this.open = false this.open = false
......
...@@ -25,11 +25,22 @@ ...@@ -25,11 +25,22 @@
v-for="buttonItem in item.process_list" v-for="buttonItem in item.process_list"
:key="buttonItem.id" :key="buttonItem.id"
class="workflow-classify-button" class="workflow-classify-button"
type="primary"
plain plain
@click="submitWorkOrder(buttonItem.id)" @click="submitWorkOrder(buttonItem.id)"
> >
<div class="process-button-div">
<div class="process-div-icon">
<e-icon class="process-div-el-icon" :icon-name="buttonItem.icon" />
</div>
<div class="process-div-body">
<div class="process-div-title ellipsis">
{{ buttonItem.name }} {{ buttonItem.name }}
</div>
<div class="process-div-remarks ellipsis">
{{ buttonItem.remarks }}
</div>
</div>
</div>
</el-button> </el-button>
</div> </div>
</div> </div>
...@@ -83,4 +94,46 @@ export default { ...@@ -83,4 +94,46 @@ export default {
.el-card__body { .el-card__body {
padding-bottom: 0; padding-bottom: 0;
} }
.process-button-div {
width: 180px;
height: 50px;
}
.process-div-icon {
float: left;
width: 50px;
height: 100%;
margin-right: 10px;
}
.process-div-el-icon {
font-size: 32px;
line-height: 50px;
color: #606266;
}
.process-div-body {
float: left;
width: 120px;
height: 100%;
text-align: left;
}
.process-div-title {
font-size: 15px;
margin-top: 8px;
color: #606266;
}
.process-div-remarks {
color: #999999;
margin-top: 3px;
}
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style> </style>
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 sign in to comment