guide.vue 3.9 KB
Newer Older
S
1  
shenjizhe 已提交
1 2
<template>
	<view style="display: flex;flex-direction: column;justify-content: space-between;">
S
1  
shenjizhe 已提交
3 4 5
		<view><uni-steps :options="progress" :active="processIndex"></uni-steps></view>
		<scroll-view style="height: 88vh">
			<thirdlucky-data-form v-if="processIndex == 0" :showButton="false" :columns="repository.columns" :formData="repository.data"></thirdlucky-data-form>
S
1  
shenjizhe 已提交
6
			<thirdlucky-data-view
S
1  
shenjizhe 已提交
7
				v-if="processIndex == 1"
S
1  
shenjizhe 已提交
8 9 10 11 12 13 14
				:buttons="buttons"
				:columns="entity.columns"
				:datas="entity.datas"
				:tableNames="entity.tableNames"
				:showButton="false"
				@selected="onSelected"
			></thirdlucky-data-view>
S
1  
shenjizhe 已提交
15 16
			<thirdlucky-data-form v-if="processIndex == 2" :showButton="false" :columns="code.columns" :formData="code.data"></thirdlucky-data-form>
		</scroll-view>
S
1  
shenjizhe 已提交
17
		<view style="display: flex;flex-direction: row;">
S
1  
shenjizhe 已提交
18 19
			<button style="flex: 1;" :disabled="processIndex == 0" @click="onPrevious">上一步</button>
			<button style="flex: 1;" :disabled="processIndex == 4" @click="onNext">下一步</button>
S
1  
shenjizhe 已提交
20
		</view>
S
1  
shenjizhe 已提交
21 22 23 24 25 26 27 28 29
	</view>
</template>

<script>
export default {
	data() {
		return {
			processIndex: 0,
			column: {},
S
1  
shenjizhe 已提交
30
			progress: [{ title: '1.新建组件' }, { title: '2.创建模型' }, { title: '3.生成代码' }, { title: '4.推送代码' }],
S
1  
shenjizhe 已提交
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
			buttons: [{ id: 'edit', name: '编辑', color: 'green' }],
			entity: {
				columns: [
					{
						name: 'name',
						info: '名称',
						type: 'text',
						tips: '名称'
					},
					{
						name: 'title',
						info: '标题',
						type: 'text',
						tips: '标题'
					},
					{
						name: 'comment',
						info: '描述',
						type: 'text',
						tips: '描述'
					},
					{
						name: 'show',
						info: '开关',
						type: 'switch',
						tips: ''
					}
				],
				datas: [],
				tableNames: ['name', 'comment']
S
1  
shenjizhe 已提交
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
			},
			repository: {
				columns: [
					{
						name: 'name',
						info: '名称',
						tips: '组件名称',
						type: 'text'
					},
					{
						name: 'comment',
						info: '介绍',
						tips: '组件介绍',
						type: 'textarea'
					},
					{
						name: 'show',
						info: '开关',
						tips: '开关',
						type: 'switch'
					},
					{
						name: 'domain_name',
						info: '域名',
						tips: 'http://localhost',
						type: 'text'
					},
					{
						name: 'project_name',
						info: '工程名称',
						tips: '工程名称',
						type: 'text'
					},
					{
						name: 'project_path',
						info: '工程路径',
						tips: '相对路径',
						type: 'text'
					},
					{
						name: 'file_path',
						info: '文件路径',
						tips: '文件相对路径',
						type: 'text'
					},
					{
						name: 'port',
						info: '端口号',
						tips: '8080',
						type: 'number'
					},
					{
						name: 'root_package',
						info: '包名',
						tips: 'com.bfec',
						type: 'text'
					},
					{
						name: 'deploy_url',
						info: '部署地址',
						tips: '172.17.14.179',
						type: 'text'
					},
					{
						name: 'deploy_path',
						info: '部署路径',
						tips: '/usr/local/services/',
						type: 'text'
					},
					{
						name: 'git_path',
						info: 'GIT地址',
						tips: 'ssh://git@support.licaiedu.com:2222/test-group/code-factory-service.git',
						type: 'text'
					},
					{
						name: 'git_group',
						info: 'GIT分组',
						tips: 'test-group',
						type: 'text'
					}
				],
				data: {}
			},
			code: {
				columns: [
					{
						name: 'template_id',
						info: '模板ID',
						tips: '1',
						type: 'number'
					}
				],
				data: {}
S
1  
shenjizhe 已提交
155 156 157 158 159 160 161
			}
		};
	},
	methods: {
		onSelected(index, action, data) {
			if (action == 'edit') {
			}
S
1  
shenjizhe 已提交
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
		},
		onPrevious() {
			if (this.processIndex > 0) {
				this.processIndex--;
			}
		},
		onNext() {
			if (this.processIndex < 4) {
				switch (this.processIndex) {
					case 0:
						break;
					case 1:
						break;
					case 2:
						break;
					case 3:
						break;
				}
				this.processIndex++;
			}
S
1  
shenjizhe 已提交
182
		}
S
1  
shenjizhe 已提交
183 184 185 186 187
	}
};
</script>

<style></style>