diff --git a/src/api/achievements/types.js b/src/api/achievements/types.js new file mode 100644 index 0000000..1af3442 --- /dev/null +++ b/src/api/achievements/types.js @@ -0,0 +1,34 @@ +import request from '@/utils/request' +import * as url from 'url' + +export function index(params) { + return request({ + method: "get", + url: "/api/admin/target_type/index", + params + }) +} + +export function show(params) { + return request({ + method: "get", + url: "/api/admin/target_type/show", + params + }) +} + +export function save(data) { + return request({ + method: "post", + url: "/api/admin/target_type/save", + data + }) +} + +export function destroy(params) { + return request({ + method: "get", + url: "/api/admin/target_type/destroy", + params + }) +} diff --git a/src/api/out/index.js b/src/api/out/index.js new file mode 100644 index 0000000..ba3bec4 --- /dev/null +++ b/src/api/out/index.js @@ -0,0 +1,13 @@ +import request from "@/utils/request" +export function getOutDetail({ tbname,out_contract_id }) { + return request({ + method: 'get', + url: '/index.php', + requestBase: '/old', + params: { + s: "/Api/flowDetail", + tbname, + out_contract_id + } + }) +} diff --git a/src/components/XyDialog/index.vue b/src/components/XyDialog/index.vue index 54604b9..2a0f5b0 100644 --- a/src/components/XyDialog/index.vue +++ b/src/components/XyDialog/index.vue @@ -41,20 +41,45 @@ export default { }, methods: { footerRender(){ - return ( -
- - -
- ) + if(this.type === 'form'){ + return ( +
+ + +
+ ) + } + if(this.type === 'normal'){ + return ( +
+ + +
+ ) + } }, showChange(e){ this.$emit('update:isShow',e) }, - cancelClick(){ - this.$emit('update:isShow',false) + validate(){ + return new Promise((resolve,reject)=>{ + this.$refs['elForm'].validate().then(res=>{ + if(res){ + resolve(res) + }else{ + reject(res) + } + }).catch(err=>{ + reject(err) + this.$Message.warning({ + content:'请填写完整信息', + duration:1 + }) + }) + }) }, reset(){ + this.$emit('reset') if(this.type === 'normal'){ return } @@ -75,6 +100,16 @@ export default { }, okClick(){ this.$emit('on-ok') + }, + clearValidate(){ + this.$refs['elForm'].clearValidate() + } + }, + watch:{ + isShow(val){ + if(!val && this.type === 'form'){ + this.reset() + } } }, render(h) { @@ -88,7 +123,7 @@ export default { footer slot: footerContent */ - const {cancelClick,okText,okClick,footerRender,width,type,$scopedSlots,rules,form,showChange,isShow,title} = this + const {okText,okClick,footerRender,width,type,$scopedSlots,rules,form,showChange,isShow,title} = this return ( { - formItems.push( - - {eval(`{$scopedSlots.${key} ? $scopedSlots.${key}() : ''}`)} - - ) - }) + for(let key in form){ + if(form.hasOwnProperty(key) && $scopedSlots[key]){ + formItems.push( + + {eval(`{$scopedSlots.${key} ? $scopedSlots.${key}() : ''}`)} + + ) + } + } return ( - {$scopedSlots.normalContent ? $scopedSlots.normalContent() : ''} + {$scopedSlots.default ? $scopedSlots.default() : ''} ) } }, + header(){ + if($scopedSlots.headerContent){ + return $scopedSlots.headerContent() + } + }, footer(){ { - if(type === 'form') return ($scopedSlots.footerContent ? $scopedSlots.footerContent() : footerRender()) - if(type === 'normal') return ( -
- - -
- ) + if(type === 'form' || type === 'normal') return ($scopedSlots.footerContent ? $scopedSlots.footerContent() : footerRender()) } } }}> @@ -167,6 +203,72 @@ export default { diff --git a/src/views/achievements/types.vue b/src/views/achievements/types.vue new file mode 100644 index 0000000..c7c5376 --- /dev/null +++ b/src/views/achievements/types.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/src/views/budget/budgetList.vue b/src/views/budget/budgetList.vue index 8fe7e4e..7b513ed 100644 --- a/src/views/budget/budgetList.vue +++ b/src/views/budget/budgetList.vue @@ -28,7 +28,7 @@ - + diff --git a/src/views/budget/point.vue b/src/views/budget/point.vue new file mode 100644 index 0000000..568c8cf --- /dev/null +++ b/src/views/budget/point.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/src/views/contract/components/detailContract.vue b/src/views/contract/components/detailContract.vue index c6e8598..eedaaff 100644 --- a/src/views/contract/components/detailContract.vue +++ b/src/views/contract/components/detailContract.vue @@ -1,51 +1,73 @@