Commit 46088183 by yuwei

项目初始化

parent 5003eac7
export default {
inserted(el, binding, vnode) {
const { value } = binding
// 工作流状态(1待提交,2已退回,3审核中,4通过,5不通过,6已撤销)
if (value) {
if (value === '1' || value === '6') {
el.disabled = false
} else {
el.disabled = true
el.classList.add('is-disabled')
}
} else {
throw new Error('请设置流程权限标签值')
}
}
}
export default {
inserted(el, binding, vnode) {
const { value } = binding
// 工作流状态(1待提交,2已退回,3审核中,4通过,5不通过,6已撤销)
if (value) {
if (value === '1' || value === '2' || value === '6') {
el.disabled = false
} else {
el.disabled = true
el.classList.add('is-disabled')
}
} else {
throw new Error('请设置流程权限标签值')
}
}
}
import flowEdit from './flowEdit'
import flowDel from './flowDel'
const install = function(Vue) {
Vue.directive('flowEdit', flowEdit)
Vue.directive('flowDel', flowDel)
}
if (window.Vue) {
window['flowEdit'] = flowEdit
window['flowDel'] = flowDel
Vue.use(install) // eslint-disable-line
}
export default install
......@@ -16,6 +16,7 @@ import '@/icons'
import '@/permission'
import perms from '@/directive/permission'
import flowPerms from '@/directive/flow'
import { getDicts } from '@/api/system/dict'
import { getConfigKey } from '@/api/system/config'
......@@ -27,6 +28,7 @@ Vue.prototype.selectDictLabel = selectDictLabel
Vue.use(ElementUI)
Vue.use(perms)
Vue.use(flowPerms)
Vue.config.productionTip = false
......
......@@ -103,7 +103,7 @@
type="text"
icon="el-icon-edit-outline"
@click="handleEdit(scope.row)"
:disabled="scope.row.flowStatus === '3' || scope.row.flowStatus === '4' || scope.row.flowStatus === '5'"
v-flow-edit="scope.row.flowStatus"
>修改</el-button>
<el-button
size="mini"
......@@ -116,7 +116,7 @@
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
:disabled="scope.row.flowStatus === '2' || scope.row.flowStatus === '3' || scope.row.flowStatus === '4' || scope.row.flowStatus === '5'"
v-flow-del="scope.row.flowStatus"
>删除</el-button>
<el-button slot="reference">操作</el-button>
</el-popover>
......
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