Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit69baad6

Browse files
author
spt
committed
types
1 parente86492a commit69baad6

File tree

69 files changed

+2565
-36
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2565
-36
lines changed

‎src/components/c8-dialog/c8-dialog.component.ts‎

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,25 @@ import Clickoutside from 'element-ui/lib/utils/clickoutside';
22
import{Vue,Prop,Component}from'vue-property-decorator';
33
import{Dialog}from'element-ui';
44
@Component({
5-
name:"platform-edit",
5+
name:"c8-dialog"
66
})
77
exportdefaultclassC8DialogComponentextendsVue{
8-
privatedialog:Dialog;
9-
dialogTableVisible:boolean=false;
8+
privatedialog:Dialog;
9+
dialogTableVisible:boolean=false;
10+
title:String;
11+
1012
mounted(){
1113
letwin:any=this.$refs["dialog"];
12-
this.dialog=win;
14+
this.dialog=win;
1315
}
16+
1417
show(){
15-
this.dialogTableVisible=true;
18+
this.dialogTableVisible=true;
1619
}
1720
close(){
18-
this.dialogTableVisible=false;
21+
this.dialogTableVisible=false;
1922
}
20-
getDialog()
21-
{
23+
getDialog(){
2224
returnthis.dialog;
2325
}
2426
}

‎src/components/c8-dialog/c8-dialog.vue‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<template>
2-
<el-dialogref="dialog"title="平台":visible.sync="dialogTableVisible">
3-
2+
3+
<el-dialogref="dialog"v-bind:title="title":visible.sync="dialogTableVisible">
4+
5+
<slot> </slot>
46
</el-dialog>
7+
58
</template>
69
<script lang="ts">
710
importC8DialogComponentfrom'@/components/c8-dialog/c8-dialog.component'

‎src/components/platform/detail/platform-detail.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<transitionname="fade"mode="out-in">
2+
<transitionname="fade"mode="out-in"v-if="detailInfo">
33
<divclass="page-main">
44
<divclass="main-box">
55
<el-tabsvalue="first"type="card">
Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
11
importClickoutsidefrom'element-ui/lib/utils/clickoutside';
22
import{Vue,Prop,Component}from'vue-property-decorator';
3-
import{Message,Dialog}from'element-ui';
4-
3+
import{Message}from'element-ui';
4+
importC8Dialogfrom"@/components/c8-dialog/c8-dialog.vue";
5+
importC8DialogComponentfrom"@/components/c8-dialog/c8-dialog.component";
6+
importPlatformServicefrom"@/services/platform.service";
57
@Component({
68
name:"platform-edit",
7-
directives:{ Clickoutside}
9+
directives:{ Clickoutside},
10+
components:{ C8Dialog}
811
})
912
exportdefaultclassPlatformEditComponentextendsVue{
13+
service:PlatformService=newPlatformService();
1014
form:any={};
11-
privatedialog:Dialog;
12-
formLabelWidth:String="100px";
13-
dialogTableVisible:boolean=false;
14-
mounted(){
15+
privatedialog:C8DialogComponent;
16+
formLabelWidth:String="100px";
17+
//dialogTableVisible:boolean=false;
18+
mounted(){
1519
letwin:any=this.$refs["dialog"];
16-
this.dialog=win;
20+
this.dialog=win;
1721
}
1822
show(){
19-
// this.showBox =true;
20-
this.dialogTableVisible=true;
23+
this.dialog.title="平台新增";
24+
this.dialog.show();
2125
}
2226
close(){
23-
this.dialogTableVisible=false;
27+
this.dialog.close();
2428
}
2529
save(num){
30+
console.log(this.form);
2631
if(!this.form.platformName){
2732
Message({
2833
showClose:true,
@@ -39,6 +44,11 @@ export default class PlatformEditComponent extends Vue {
3944
});
4045
return;
4146
}
47+
this.service.saveModel(this.form).then(r=>{
48+
if(r.data.result){
49+
this.close();
50+
}
51+
});
4252
}
4353
}
4454

‎src/components/platform/edit/platform-edit.vue‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
<template>
2-
<el-dialogref="dialog"title="平台":visible.sync="dialogTableVisible">
2+
<c8-dialogref="dialog" >
33
<el-form:model="form">
44
<el-form-itemlabel="平台名称":label-width="formLabelWidth">
55
<el-inputv-model="form.platformName"auto-complete="off"></el-input>
66
</el-form-item>
77
<el-form-itemlabel="平台编号":label-width="formLabelWidth">
8-
<el-inputv-model="form.platfplatformCodeormName"auto-complete="off"></el-input>
8+
<el-inputv-model="form.platformCode"auto-complete="off"></el-input>
99
</el-form-item>
1010
<el-form-itemlabel="平台备注":label-width="formLabelWidth">
1111
<el-inputv-model="form.platformRemark"auto-complete="off"></el-input>
1212
</el-form-item>
1313
</el-form>
14-
<divslot="footer"class="dialog-footer">
14+
<divclass="el-dialog__footerdialog-footer">
1515
<el-button@click="close()">取 消</el-button>
1616
<el-buttontype="primary"@click="save()">确 定</el-button>
1717
</div>
18-
</el-dialog>
18+
</c8-dialog>
1919
</template>
2020
<script lang="ts">
2121
importPlatformEditComponentfrom'@/components/platform/edit/platform-edit.component'

‎src/element-ui.d.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
importElementUIfrom'./types/index'
2+
export=ElementUI;

‎src/services/platform.service.ts‎

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
importaxiosfrom'axios';
2+
import{CallResult}from"@/business-model/CallResult";
23

34
exportdefaultclassPlatformService{
45
search(params1,params2){
@@ -18,7 +19,7 @@ export default class PlatformService {
1819
});
1920

2021
}
21-
newPlatform(params){
22+
saveModel(params){
2223
returnaxios.post(`platform/saveModel`,params);
2324

2425
}
@@ -31,18 +32,14 @@ export default class PlatformService {
3132
getFunList(params1,params2){
3233
returnaxios.post('resource-set/search',params1,{params:params2});
3334
}
34-
create(params){
35-
returnaxios.post('contract/create',params);
36-
}
35+
3736
edit(id,params){
3837
returnaxios.put(`contract/${id}/edit`,params);
3938
}
4039
tenantFuzzy(params){
4140
returnaxios.get(`tenant/search-by-name`,{params:params});
4241
}
43-
servicePackageFuzzy(params){
44-
returnaxios.get(`contract/search-by-name-non-tenant`,{params:params});
45-
}
42+
4643
addPlatformTenant(params){
4744
returnaxios.post('platform/savePlatformTenant',params);
4845
}
@@ -59,7 +56,5 @@ export default class PlatformService {
5956
headers:{'Content-Type':'application/json;charset=UTF-8'}
6057
})
6158
}
62-
accountDetail(p){
63-
returnaxios.get('/platform/'+p.id+'/account/search',{params:p.params})
64-
}
59+
6560
};

‎src/types/alert.d.ts‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import{ElementUIComponent}from'./component'
2+
3+
exporttypeAlertType='success'|'warning'|'info'|'error'
4+
5+
/** Alert Component */
6+
exportdeclareclassElAlertextendsElementUIComponent{
7+
/** Title */
8+
title:string
9+
10+
/** Component type */
11+
type:AlertType
12+
13+
/** Descriptive text. Can also be passed with the default slot */
14+
description:string
15+
16+
/** If closable or not */
17+
closable:boolean
18+
19+
/** Customized close button text */
20+
closeText:string
21+
22+
/** If a type icon is displayed */
23+
showIcon:boolean
24+
}

‎src/types/autocomplete.d.ts‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import{ElementUIComponent}from'./component'
2+
import{IconClickEventHandler}from'./input'
3+
4+
exportinterfaceFetchSuggestionsCallback{
5+
/**
6+
* Callback function used in fetch-suggestions function
7+
*
8+
*@param data Suggestions to use
9+
*/
10+
(data:any[]):void
11+
}
12+
13+
exportinterfaceFetchSuggestions{
14+
/**
15+
* The function passed into the fetch-suggestions property
16+
*
17+
*@param queryString Current value of the text input
18+
*@param callback Callback function used to indicate that suggestions have completely fetched
19+
*/
20+
(queryString:string,callback:FetchSuggestionsCallback):void
21+
}
22+
23+
/** Autocomplete Component */
24+
exportdeclareclassElAutocompleteextendsElementUIComponent{
25+
/** The placeholder of Autocomplete */
26+
placeholder:string
27+
28+
/** Whether Autocomplete is disabled */
29+
disabled:boolean
30+
31+
/** Icon name */
32+
icon:string
33+
34+
/** Binding value */
35+
value:string
36+
37+
/** Component name of your customized suggestion list item */
38+
customItem:string
39+
40+
/** A method to fetch input suggestions. When suggestions are ready, invoke callback(data:[]) to return them to Autocomplete */
41+
fetchSuggestions:FetchSuggestions
42+
43+
/** Custom class name for autocomplete's dropdown */
44+
popperClass:string
45+
46+
/** Whether show suggestions when input focus */
47+
triggerOnFocus:boolean
48+
49+
/** Hook function when clicking on the input icon */
50+
onIconClick:IconClickEventHandler
51+
}

‎src/types/badge.d.ts‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import{ElementUIComponent}from'./component'
2+
3+
/** Badge Component */
4+
exportdeclareclassElBadgeextendsElementUIComponent{
5+
/** Display value */
6+
value:string|number
7+
8+
/** Maximum value, shows '{max}+' when exceeded. Only works if `value` is a number */
9+
max:number
10+
11+
/** If a little dot is displayed */
12+
isDot:boolean
13+
14+
/** Hidden badge */
15+
hidden:boolean
16+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp