优化代码
This commit is contained in:
		| @@ -14,7 +14,7 @@ | |||||||
|                   <el-row type="flex"> |                   <el-row type="flex"> | ||||||
|                     <div class="fill"> |                     <div class="fill"> | ||||||
|                       <el-form-item label="系统类型" prop="type"> |                       <el-form-item label="系统类型" prop="type"> | ||||||
|                         <ai-select v-model="form.type" :selectList="dict.getDict('systemType')" @change="form.apps = [],handleSysTypeChange(form.type)"/> |                         <ai-select v-model="form.type" :selectList="dict.getDict('systemType')" @change="form.apps = []"/> | ||||||
|                       </el-form-item> |                       </el-form-item> | ||||||
|                       <el-form-item label="更新项目路径" prop="dist"> |                       <el-form-item label="更新项目路径" prop="dist"> | ||||||
|                         <el-input v-model="form.dist" placeholder="常填写nginx路径,下载包从这里取" clearable/> |                         <el-input v-model="form.dist" placeholder="常填写nginx路径,下载包从这里取" clearable/> | ||||||
| @@ -38,173 +38,7 @@ | |||||||
|                   <ai-empty v-else>请先选择系统类型</ai-empty> |                   <ai-empty v-else>请先选择系统类型</ai-empty> | ||||||
|                 </template> |                 </template> | ||||||
|               </ai-card> |               </ai-card> | ||||||
|               <ai-card title="扩展设置"> |               <component class="extraConfig" title="扩展设置" :is="extraConfig" v-model="form.extra"/> | ||||||
|                 <template #right> |  | ||||||
|                   <template v-if="form.type=='web'"> |  | ||||||
|                     <ai-dialog-btn text="设置系统信息" dialogTitle="系统信息"> |  | ||||||
|                       <el-form size="small" label-width="140px"> |  | ||||||
|                         <el-form-item label="系统标题"> |  | ||||||
|                           <el-input v-model="form.sysInfo.fullTitle" placeholder="请输入..." clearable/> |  | ||||||
|                         </el-form-item> |  | ||||||
|                         <el-form-item label="favicon"> |  | ||||||
|                           <el-input v-model="form.sysInfo.favicon" placeholder="请输入..." clearable/> |  | ||||||
|                         </el-form-item> |  | ||||||
|                         <el-form-item label="logo"> |  | ||||||
|                           <el-row type="flex"> |  | ||||||
|                             <el-input v-model="form.sysInfo.logo" placeholder="请输入..." clearable/> |  | ||||||
|                             <el-input class="mar-l10" v-model="form.sysInfo.logoText" placeholder="logo文字"> |  | ||||||
|                               <template #prepend>logo文字</template> |  | ||||||
|                             </el-input> |  | ||||||
|                           </el-row> |  | ||||||
|                         </el-form-item> |  | ||||||
|                         <el-form-item label="登录页"> |  | ||||||
|                           <el-row type="flex" class="mar-b10"> |  | ||||||
|                             <el-input v-model="form.sysInfo.loginLogo" placeholder="登录页左上角logo,带/代表图片" clearable> |  | ||||||
|                               <template #prepend>左页首logo</template> |  | ||||||
|                             </el-input> |  | ||||||
|                             <el-input class="mar-l10" v-model="form.sysInfo.loginLogoText" placeholder="logo文字" clearable> |  | ||||||
|                               <template #prepend>logo文字</template> |  | ||||||
|                             </el-input> |  | ||||||
|                           </el-row> |  | ||||||
|                           <el-row type="flex"> |  | ||||||
|                             <el-input v-model="form.sysInfo.name" placeholder="左上角标题" clearable> |  | ||||||
|                               <template #prepend>左上角标题</template> |  | ||||||
|                             </el-input> |  | ||||||
|                             <el-input class="mar-l10" v-model="form.sysInfo.title" placeholder="左上角副标题" clearable> |  | ||||||
|                               <template #prepend>左上角副标题</template> |  | ||||||
|                             </el-input> |  | ||||||
|                           </el-row> |  | ||||||
|                           <el-input class="mar-t10" type="textarea" rows="5" v-model="form.sysInfo.desc" placeholder="副标题" clearable/> |  | ||||||
|                         </el-form-item> |  | ||||||
|                         <el-row type="flex"> |  | ||||||
|                           <div class="fill"> |  | ||||||
|                             <el-form-item label="版权所有"> |  | ||||||
|                               <el-input v-model="form.sysInfo.recordDesc" placeholder="请输入..." clearable/> |  | ||||||
|                             </el-form-item> |  | ||||||
|                             <el-form-item label="备案号"> |  | ||||||
|                               <el-input v-model="form.sysInfo.recordNo" placeholder="请输入..." clearable/> |  | ||||||
|                             </el-form-item> |  | ||||||
|                           </div> |  | ||||||
|                           <div class="fill"> |  | ||||||
|                             <el-form-item label="框架版本"> |  | ||||||
|                               <!--edition :版本,标准版:standard、上架版:saas 简易版(不带扫码):simple --> |  | ||||||
|                               <el-input v-model="form.sysInfo.edition" placeholder="请输入..." clearable/> |  | ||||||
|                             </el-form-item> |  | ||||||
|                             <el-form-item label="备案跳转链接"> |  | ||||||
|                               <el-input v-model="form.sysInfo.recordURL" placeholder="请输入..." clearable/> |  | ||||||
|                             </el-form-item> |  | ||||||
|                           </div> |  | ||||||
|                         </el-row> |  | ||||||
|                         <el-form-item label="可信证书"> |  | ||||||
|                           <el-input type="textarea" v-model="form.sysInfo.ssl" placeholder="请输入可信证书的html代码" clearable rows="5"/> |  | ||||||
|                         </el-form-item> |  | ||||||
|                       </el-form> |  | ||||||
|                     </ai-dialog-btn> |  | ||||||
|                   </template> |  | ||||||
|                 </template> |  | ||||||
|                 <template #content> |  | ||||||
|                   <template v-if="form.type=='mp'"> |  | ||||||
|                     <el-form-item label="小程序AppId"> |  | ||||||
|                       <el-input v-model="form.appId" clearable placeholder="小程序appId"/> |  | ||||||
|                     </el-form-item> |  | ||||||
|                     <el-form-item label="半屏小程序"> |  | ||||||
|                       <el-input v-model="form.embeddedAppIdList" clearable placeholder="如果有多个,请用英文','分割"/> |  | ||||||
|                     </el-form-item> |  | ||||||
|                     <el-form-item label="接口是否单服务"> |  | ||||||
|                       <el-checkbox v-model="form.isSingleService"/> |  | ||||||
|                     </el-form-item> |  | ||||||
|                     <el-form-item label="引导页"> |  | ||||||
|                       <el-input v-model="form.guide" placeholder="带'/'会被认为是输入的页面路径" clearable/> |  | ||||||
|                     </el-form-item> |  | ||||||
|                     <ai-title title="底部导航栏"> |  | ||||||
|                       <el-button type="text" slot="rightBtn" icon="iconfont iconAdd" @click="tabBar.list.push({})">添加</el-button> |  | ||||||
|                     </ai-title> |  | ||||||
|                     <ai-table :tableData="tabBar.list" :colConfigs="colConfigs" tableSize="mini" :isShowPagination="false" border ref="TabBar"> |  | ||||||
|                       <el-table-column slot="options" label="操作" width="260" align="center"> |  | ||||||
|                         <template slot-scope="{row,$index}"> |  | ||||||
|                           <el-row type="flex" class="tabBarOptions"> |  | ||||||
|                             <ai-dialog-btn text="更换" dialogTitle="选择应用"> |  | ||||||
|                               <ai-lib-table :meta="appList" v-model="row.id" @select="v=>handleTabbarChange(row,v)" :isShowPagination="false" v-bind="$props" |  | ||||||
|                                             :border="false"/> |  | ||||||
|                             </ai-dialog-btn> |  | ||||||
|                             <ai-dialog-btn text="编辑" dialogTitle="编辑导航栏" width="600px"> |  | ||||||
|                               <el-form-item label="名称"> |  | ||||||
|                                 <el-input v-model="row.text" placeholder="请输入" clearable/> |  | ||||||
|                               </el-form-item> |  | ||||||
|                               <el-form-item label="默认图标"> |  | ||||||
|                                 <el-input v-model="row.iconPath" placeholder="请输入" clearable/> |  | ||||||
|                               </el-form-item> |  | ||||||
|                               <el-form-item label="选中图标"> |  | ||||||
|                                 <el-input v-model="row.selectedIconPath" placeholder="请输入" clearable/> |  | ||||||
|                               </el-form-item> |  | ||||||
|                             </ai-dialog-btn> |  | ||||||
|                             <el-button type="text" @click="handleTabbarDelete($index)">删除</el-button> |  | ||||||
|                             <el-button type="text" @click="handleTabbarPosition($index,-1)" v-if="$index>0">上移</el-button> |  | ||||||
|                             <el-button type="text" @click="handleTabbarPosition($index,1)" v-if="$index<tabBar.list.length-1">下移</el-button> |  | ||||||
|                           </el-row> |  | ||||||
|                         </template> |  | ||||||
|                       </el-table-column> |  | ||||||
|                     </ai-table> |  | ||||||
|                   </template> |  | ||||||
|                   <template v-else-if="form.type=='wxwork'"> |  | ||||||
|                     <el-row type="flex"> |  | ||||||
|                       <div class="fill"> |  | ||||||
|                         <el-form-item label="接口是否单服务"> |  | ||||||
|                           <el-checkbox v-model="form.isSingleService"/> |  | ||||||
|                         </el-form-item> |  | ||||||
|                         <el-form-item label="是否启用水印"> |  | ||||||
|                           <el-checkbox v-model="form.waterMarker"/> |  | ||||||
|                         </el-form-item> |  | ||||||
|                         <el-form-item label="自定义登录"> |  | ||||||
|                           <el-checkbox v-model="form.customLogin"/> |  | ||||||
|                         </el-form-item> |  | ||||||
|                       </div> |  | ||||||
|                       <div class="fill"> |  | ||||||
|                         <el-form-item label="域名根目录(baseURL)"> |  | ||||||
|                           <el-input v-model="form.base" clearable placeholder="域名根目录"/> |  | ||||||
|                         </el-form-item> |  | ||||||
|                         <el-form-item label="默认首页"> |  | ||||||
|                           <el-input v-model="form.homePage" clearable placeholder="填写应用的文件名"/> |  | ||||||
|                         </el-form-item> |  | ||||||
|                         <el-form-item label="开启百度流量"> |  | ||||||
|                           <el-checkbox v-model="form.hmt"/> |  | ||||||
|                         </el-form-item> |  | ||||||
|                       </div> |  | ||||||
|                     </el-row> |  | ||||||
|                   </template> |  | ||||||
|                   <template v-else-if="form.type=='web'"> |  | ||||||
|                     <el-form-item label="头部导航工具栏"> |  | ||||||
|                       <el-checkbox v-model="form.downloadCenter">下载中心</el-checkbox> |  | ||||||
|                       <el-checkbox v-model="form.dv">数据大屏</el-checkbox> |  | ||||||
|                       <el-checkbox v-model="form.showTool">显示/隐藏导航栏</el-checkbox> |  | ||||||
|                       <el-checkbox v-model="form.helpDoc">帮助文档</el-checkbox> |  | ||||||
|                       <el-checkbox v-model="form.customerService">智能客服</el-checkbox> |  | ||||||
|                       <el-checkbox v-model="form.appQRCode">手机APP</el-checkbox> |  | ||||||
|                     </el-form-item> |  | ||||||
|                     <el-row type="flex"> |  | ||||||
|                       <div class="fill"> |  | ||||||
|                         <el-form-item label="接口是否单服务"> |  | ||||||
|                           <el-checkbox v-model="form.isSingleService"/> |  | ||||||
|                         </el-form-item> |  | ||||||
|                         <el-form-item label="默认首页"> |  | ||||||
|                           <el-input v-model="form.homePage" clearable placeholder="填写应用的文件名"/> |  | ||||||
|                         </el-form-item> |  | ||||||
|                         <el-form-item label="是否加载AI助手"> |  | ||||||
|                           <el-checkbox v-model="form.copilot"/> |  | ||||||
|                         </el-form-item> |  | ||||||
|                       </div> |  | ||||||
|                       <div class="fill"> |  | ||||||
|                         <el-form-item label="域名根目录"> |  | ||||||
|                           <el-input v-model="form.base" clearable placeholder="填写域名根目录(baseURL)"/> |  | ||||||
|                         </el-form-item> |  | ||||||
|                         <el-form-item label="开启百度流量"> |  | ||||||
|                           <el-checkbox v-model="form.hmt"/> |  | ||||||
|                         </el-form-item> |  | ||||||
|                       </div> |  | ||||||
|                     </el-row> |  | ||||||
|                   </template> |  | ||||||
|                 </template> |  | ||||||
|               </ai-card> |  | ||||||
|             </el-form> |             </el-form> | ||||||
|           </el-tab-pane> |           </el-tab-pane> | ||||||
|           <el-tab-pane label="方案应用" lazy> |           <el-tab-pane label="方案应用" lazy> | ||||||
| @@ -233,6 +67,9 @@ | |||||||
| <script> | <script> | ||||||
| import {mapActions} from "vuex" | import {mapActions} from "vuex" | ||||||
| import AiLibTable from "./AiLibTable"; | import AiLibTable from "./AiLibTable"; | ||||||
|  | import webConfig from "./config/webConfig.vue"; | ||||||
|  | import wxcpConfig from "./config/wxcpConfig.vue"; | ||||||
|  | import wxmpConfig from "./config/wxmpConfig.vue"; | ||||||
|  |  | ||||||
| export default { | export default { | ||||||
|   name: "add", |   name: "add", | ||||||
| @@ -256,6 +93,11 @@ export default { | |||||||
|         return e |         return e | ||||||
|       }).filter(e => e.project != "core") || [] |       }).filter(e => e.project != "core") || [] | ||||||
|     }, |     }, | ||||||
|  |     extraConfig: v => ({ | ||||||
|  |       web: webConfig, | ||||||
|  |       wxwork: wxcpConfig, | ||||||
|  |       mp: wxmpConfig | ||||||
|  |     }[v.form.type]) | ||||||
|   }, |   }, | ||||||
|   data() { |   data() { | ||||||
|     return { |     return { | ||||||
| @@ -265,12 +107,6 @@ export default { | |||||||
|         type: {required: true, message: "请选择"}, |         type: {required: true, message: "请选择"}, | ||||||
|         // customPath: {required: true, message: "请输入"}, |         // customPath: {required: true, message: "请输入"}, | ||||||
|       }, |       }, | ||||||
|       colConfigs: [ |  | ||||||
|         {prop: 'text', label: "名称", width: 120}, |  | ||||||
|         {prop: 'pagePath', label: "应用路径"}, |  | ||||||
|         {prop: 'iconPath', label: "默认图标"}, |  | ||||||
|         {prop: 'selectedIconPath', label: "选中图标"}, |  | ||||||
|       ], |  | ||||||
|       appListConfigs: [ |       appListConfigs: [ | ||||||
|         {prop: 'label', label: "应用名称", render: (h, {row}) => h(row.tabbar ? 'b' : 'p', row.label + `  ${row.tabbar ? '(底部导航栏)' : ''}`)}, |         {prop: 'label', label: "应用名称", render: (h, {row}) => h(row.tabbar ? 'b' : 'p', row.label + `  ${row.tabbar ? '(底部导航栏)' : ''}`)}, | ||||||
|         {prop: 'project', label: "项目/框架"}, |         {prop: 'project', label: "项目/框架"}, | ||||||
| @@ -302,7 +138,6 @@ export default { | |||||||
|       }).then(res => { |       }).then(res => { | ||||||
|         if (res?.data) { |         if (res?.data) { | ||||||
|           this.form = {...this.form, ...res.data} |           this.form = {...this.form, ...res.data} | ||||||
|           this.handleSysTypeChange(this.form.type, this.form.extra) |  | ||||||
|         } |         } | ||||||
|       }) |       }) | ||||||
|     }, |     }, | ||||||
| @@ -313,37 +148,9 @@ export default { | |||||||
|     submit() { |     submit() { | ||||||
|       this.$refs.AddForm.validate(v => { |       this.$refs.AddForm.validate(v => { | ||||||
|         if (v) { |         if (v) { | ||||||
|           const { |           if (this.form.type == 'web') { | ||||||
|             tabBar, |             this.form.extra.sysInfo.desc = JSON.parse(this.form.extra.sysInfo.desc || null) | ||||||
|             form: { |             this.form.extra.sysInfo.ssl = this.form.extra.sysInfo.ssl?.replace(/"/g, "'") | ||||||
|               type, |  | ||||||
|               appId, |  | ||||||
|               embeddedAppIdList, |  | ||||||
|               isSingleService, |  | ||||||
|               homePage, |  | ||||||
|               hmt, |  | ||||||
|               dv, |  | ||||||
|               downloadCenter, |  | ||||||
|               showTool, |  | ||||||
|               helpDoc, |  | ||||||
|               customerService, |  | ||||||
|               sysInfo, |  | ||||||
|               appQRCode, |  | ||||||
|               customLogin, |  | ||||||
|               base, |  | ||||||
|               guide, |  | ||||||
|               copilot |  | ||||||
|             } |  | ||||||
|           } = this |  | ||||||
|           if (type == 'mp') { |  | ||||||
|             this.form.extra = {tabBar, appId, embeddedAppIdList, isSingleService, guide} |  | ||||||
|           } else if (type == 'web') { |  | ||||||
|             const {desc} = sysInfo |  | ||||||
|             sysInfo.desc = JSON.parse(desc || null) |  | ||||||
|             sysInfo.ssl = sysInfo.ssl?.replace(/"/g, "'") |  | ||||||
|             this.form.extra = {isSingleService, homePage, hmt, dv, downloadCenter, showTool, helpDoc, customerService, sysInfo, appQRCode, base, copilot} |  | ||||||
|           } else if (type == 'wxwork') { |  | ||||||
|             this.form.extra = {isSingleService, homePage, hmt, customLogin, base} |  | ||||||
|           } |           } | ||||||
|           this.instance.post("/node/custom/addOrUpdate", this.form).then(res => { |           this.instance.post("/node/custom/addOrUpdate", this.form).then(res => { | ||||||
|             if (res?.code == 0) { |             if (res?.code == 0) { | ||||||
| @@ -354,34 +161,11 @@ export default { | |||||||
|         } |         } | ||||||
|       }) |       }) | ||||||
|     }, |     }, | ||||||
|     handleSysTypeChange(v, data = {}) { |  | ||||||
|       let values = this.$copy(data) |  | ||||||
|       if (v == 'mp') { |  | ||||||
|         if (values?.tabBar) { |  | ||||||
|           this.tabBar = values.tabBar || this.tabBar |  | ||||||
|           delete values.tabBar |  | ||||||
|         } |  | ||||||
|       } else if (v == 'web') { |  | ||||||
|         if (values?.sysInfo?.desc) values.sysInfo.desc = JSON.stringify(values.sysInfo.desc) |  | ||||||
|       } |  | ||||||
|       Object.keys(values).map(e => this.$set(this.form, e, values[e])) |  | ||||||
|     }, |  | ||||||
|     handleTabbarChange(row, {name, label}) { |  | ||||||
|       row.text = label |  | ||||||
|       row.pagePath = `pages/${name}/${name}` |  | ||||||
|     }, |  | ||||||
|     handleTabbarDelete(i) { |  | ||||||
|       this.tabBar.list?.splice(i, 1) |  | ||||||
|     }, |  | ||||||
|     handleAppEdit(row) { |     handleAppEdit(row) { | ||||||
|       const i = this.form.appList.findIndex(e => e.id == row.id) |       const i = this.form.appList.findIndex(e => e.id == row.id) | ||||||
|       this.form.appList.splice(i, 1, row) |       this.form.appList.splice(i, 1, row) | ||||||
|     }, |     }, | ||||||
|     handleTabbarPosition(i, offset) { |  | ||||||
|       const row = this.tabBar.list[i] |  | ||||||
|       this.tabBar.list.splice(i, 1, this.tabBar.list[i + offset]) |  | ||||||
|       this.tabBar.list.splice(i + offset, 1, row) |  | ||||||
|     } |  | ||||||
|   }, |   }, | ||||||
|   created() { |   created() { | ||||||
|     this.getDetail() |     this.getDetail() | ||||||
| @@ -404,5 +188,16 @@ export default { | |||||||
|       margin-left: 0; |       margin-left: 0; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   :deep(.extraConfig) { | ||||||
|  |     .ai-card__body { | ||||||
|  |       display: grid; | ||||||
|  |       grid-template-columns: 1fr 1fr; | ||||||
|  |  | ||||||
|  |       .row { | ||||||
|  |         grid-column: span 2; | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   } | ||||||
| } | } | ||||||
| </style> | </style> | ||||||
|   | |||||||
							
								
								
									
										117
									
								
								project/oms/apps/develop/AppDeployCustom/config/webConfig.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										117
									
								
								project/oms/apps/develop/AppDeployCustom/config/webConfig.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,117 @@ | |||||||
|  | <script> | ||||||
|  | export default { | ||||||
|  |   name: "webConfig", | ||||||
|  |   model: { | ||||||
|  |     prop: "form", | ||||||
|  |     event: "input" | ||||||
|  |   }, | ||||||
|  |   props: { | ||||||
|  |     form: Object, | ||||||
|  |     title: String | ||||||
|  |   }, | ||||||
|  |   watch: { | ||||||
|  |     form: { | ||||||
|  |       handler() { | ||||||
|  |         this.$emit("input", this.form) | ||||||
|  |       }, | ||||||
|  |       deep: true | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  |  | ||||||
|  | <template> | ||||||
|  |   <ai-card :title="title" class="webConfig"> | ||||||
|  |     <template #right> | ||||||
|  |       <ai-dialog-btn text="设置系统信息" dialogTitle="系统信息"> | ||||||
|  |         <el-form size="small" label-width="140px"> | ||||||
|  |           <el-form-item label="系统标题"> | ||||||
|  |             <el-input v-model="form.sysInfo.fullTitle" placeholder="请输入..." clearable/> | ||||||
|  |           </el-form-item> | ||||||
|  |           <el-form-item label="favicon"> | ||||||
|  |             <el-input v-model="form.sysInfo.favicon" placeholder="请输入..." clearable/> | ||||||
|  |           </el-form-item> | ||||||
|  |           <el-form-item label="logo"> | ||||||
|  |             <el-row type="flex"> | ||||||
|  |               <el-input v-model="form.sysInfo.logo" placeholder="请输入..." clearable/> | ||||||
|  |               <el-input class="mar-l10" v-model="form.sysInfo.logoText" placeholder="logo文字"> | ||||||
|  |                 <template #prepend>logo文字</template> | ||||||
|  |               </el-input> | ||||||
|  |             </el-row> | ||||||
|  |           </el-form-item> | ||||||
|  |           <el-form-item label="登录页"> | ||||||
|  |             <el-row type="flex" class="mar-b10"> | ||||||
|  |               <el-input v-model="form.sysInfo.loginLogo" placeholder="登录页左上角logo,带/代表图片" clearable> | ||||||
|  |                 <template #prepend>左页首logo</template> | ||||||
|  |               </el-input> | ||||||
|  |               <el-input class="mar-l10" v-model="form.sysInfo.loginLogoText" placeholder="logo文字" clearable> | ||||||
|  |                 <template #prepend>logo文字</template> | ||||||
|  |               </el-input> | ||||||
|  |             </el-row> | ||||||
|  |             <el-row type="flex"> | ||||||
|  |               <el-input v-model="form.sysInfo.name" placeholder="左上角标题" clearable> | ||||||
|  |                 <template #prepend>左上角标题</template> | ||||||
|  |               </el-input> | ||||||
|  |               <el-input class="mar-l10" v-model="form.sysInfo.title" placeholder="左上角副标题" clearable> | ||||||
|  |                 <template #prepend>左上角副标题</template> | ||||||
|  |               </el-input> | ||||||
|  |             </el-row> | ||||||
|  |             <el-input class="mar-t10" type="textarea" rows="5" v-model="form.sysInfo.desc" placeholder="副标题" clearable/> | ||||||
|  |           </el-form-item> | ||||||
|  |           <el-row type="flex"> | ||||||
|  |             <div class="fill"> | ||||||
|  |               <el-form-item label="版权所有"> | ||||||
|  |                 <el-input v-model="form.sysInfo.recordDesc" placeholder="请输入..." clearable/> | ||||||
|  |               </el-form-item> | ||||||
|  |               <el-form-item label="备案号"> | ||||||
|  |                 <el-input v-model="form.sysInfo.recordNo" placeholder="请输入..." clearable/> | ||||||
|  |               </el-form-item> | ||||||
|  |             </div> | ||||||
|  |             <div class="fill"> | ||||||
|  |               <el-form-item label="框架版本"> | ||||||
|  |                 <!--edition :版本,标准版:standard、上架版:saas 简易版(不带扫码):simple --> | ||||||
|  |                 <el-input v-model="form.sysInfo.edition" placeholder="请输入..." clearable/> | ||||||
|  |               </el-form-item> | ||||||
|  |               <el-form-item label="备案跳转链接"> | ||||||
|  |                 <el-input v-model="form.sysInfo.recordURL" placeholder="请输入..." clearable/> | ||||||
|  |               </el-form-item> | ||||||
|  |             </div> | ||||||
|  |           </el-row> | ||||||
|  |           <el-form-item label="可信证书"> | ||||||
|  |             <el-input type="textarea" v-model="form.sysInfo.ssl" placeholder="请输入可信证书的html代码" clearable rows="5"/> | ||||||
|  |           </el-form-item> | ||||||
|  |         </el-form> | ||||||
|  |       </ai-dialog-btn> | ||||||
|  |     </template> | ||||||
|  |     <template #content> | ||||||
|  |       <el-form-item label="头部导航工具栏" class="row"> | ||||||
|  |         <el-checkbox v-model="form.downloadCenter">下载中心</el-checkbox> | ||||||
|  |         <el-checkbox v-model="form.dv">数据大屏</el-checkbox> | ||||||
|  |         <el-checkbox v-model="form.showTool">显示/隐藏导航栏</el-checkbox> | ||||||
|  |         <el-checkbox v-model="form.helpDoc">帮助文档</el-checkbox> | ||||||
|  |         <el-checkbox v-model="form.customerService">智能客服</el-checkbox> | ||||||
|  |         <el-checkbox v-model="form.appQRCode">手机APP</el-checkbox> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="接口是否单服务"> | ||||||
|  |         <el-checkbox v-model="form.isSingleService"/> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="域名根目录"> | ||||||
|  |         <el-input v-model="form.base" clearable placeholder="填写域名根目录(baseURL)"/> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="默认首页"> | ||||||
|  |         <el-input v-model="form.homePage" clearable placeholder="填写应用的文件名"/> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="开启百度流量"> | ||||||
|  |         <el-checkbox v-model="form.hmt"/> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="是否加载AI助手"> | ||||||
|  |         <el-checkbox v-model="form.copilot"/> | ||||||
|  |       </el-form-item> | ||||||
|  |     </template> | ||||||
|  |   </ai-card> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <style scoped lang="scss"> | ||||||
|  | .webConfig { | ||||||
|  | } | ||||||
|  | </style> | ||||||
| @@ -0,0 +1,51 @@ | |||||||
|  | <script> | ||||||
|  | export default { | ||||||
|  |   name: "wxcpConfig", | ||||||
|  |   model: { | ||||||
|  |     prop: "form", | ||||||
|  |     event: "input" | ||||||
|  |   }, | ||||||
|  |   props: { | ||||||
|  |     form: Object, | ||||||
|  |     title: String | ||||||
|  |   }, | ||||||
|  |   watch: { | ||||||
|  |     form: { | ||||||
|  |       handler() { | ||||||
|  |         this.$emit("input", this.form) | ||||||
|  |       }, | ||||||
|  |       deep: true | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  |  | ||||||
|  | <template> | ||||||
|  |   <ai-card :title="title" class="wxcpConfig"> | ||||||
|  |     <template #content> | ||||||
|  |       <el-form-item label="默认首页"> | ||||||
|  |         <el-input v-model="form.homePage" clearable placeholder="填写应用的文件名"/> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="域名根目录(baseURL)"> | ||||||
|  |         <el-input v-model="form.base" clearable placeholder="域名根目录"/> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="是否启用水印"> | ||||||
|  |         <el-checkbox v-model="form.waterMarker"/> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="接口是否单服务"> | ||||||
|  |         <el-checkbox v-model="form.isSingleService"/> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="自定义登录"> | ||||||
|  |         <el-checkbox v-model="form.customLogin"/> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="开启百度流量"> | ||||||
|  |         <el-checkbox v-model="form.hmt"/> | ||||||
|  |       </el-form-item> | ||||||
|  |     </template> | ||||||
|  |   </ai-card> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <style scoped lang="scss"> | ||||||
|  | .wxcpConfig { | ||||||
|  | } | ||||||
|  | </style> | ||||||
							
								
								
									
										115
									
								
								project/oms/apps/develop/AppDeployCustom/config/wxmpConfig.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										115
									
								
								project/oms/apps/develop/AppDeployCustom/config/wxmpConfig.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,115 @@ | |||||||
|  | <script> | ||||||
|  | import AiLibTable from "../AiLibTable.vue"; | ||||||
|  |  | ||||||
|  | export default { | ||||||
|  |   name: "wxmpConfig", | ||||||
|  |   components: {AiLibTable}, | ||||||
|  |   model: { | ||||||
|  |     prop: "form", | ||||||
|  |     event: "input" | ||||||
|  |   }, | ||||||
|  |   props: { | ||||||
|  |     form: Object, | ||||||
|  |     title: String | ||||||
|  |   }, | ||||||
|  |   watch: { | ||||||
|  |     form: { | ||||||
|  |       handler() { | ||||||
|  |         this.$emit("input", this.form) | ||||||
|  |       }, | ||||||
|  |       deep: true | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       colConfigs: [ | ||||||
|  |         {prop: 'text', label: "名称", width: 120}, | ||||||
|  |         {prop: 'pagePath', label: "应用路径"}, | ||||||
|  |         {prop: 'iconPath', label: "默认图标"}, | ||||||
|  |         {prop: 'selectedIconPath', label: "选中图标"}, | ||||||
|  |       ], | ||||||
|  |       tabBar: { | ||||||
|  |         color: "#666666", | ||||||
|  |         selectedColor: "#197DF0", | ||||||
|  |         backgroundColor: "#ffffff", | ||||||
|  |         list: [ | ||||||
|  |           {pagePath: "pages/AppHome/AppHome", text: "首页", iconPath: "static/TabBar/home.png", selectedIconPath: "static/TabBar/home_selected.png"}, | ||||||
|  |           {pagePath: "pages/AppModules/AppModules", text: "应用", iconPath: "static/TabBar/service.png", selectedIconPath: "static/TabBar/service_selected.png"}, | ||||||
|  |           { | ||||||
|  |             pagePath: "pages/AppEnteringVillage/AppEnteringVillage", text: "进村", | ||||||
|  |             iconPath: "static/TabBar/custom.png", selectedIconPath: "static/TabBar/custom_selected.png" | ||||||
|  |           }, | ||||||
|  |           {pagePath: "pages/AppMine/AppMine", text: "我的", iconPath: "static/TabBar/me.png", selectedIconPath: "static/TabBar/me_selected.png"} | ||||||
|  |         ] | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     handleTabbarChange(row, {name, label}) { | ||||||
|  |       row.text = label | ||||||
|  |       row.pagePath = `pages/${name}/${name}` | ||||||
|  |     }, | ||||||
|  |     handleTabbarDelete(i) { | ||||||
|  |       this.tabBar.list?.splice(i, 1) | ||||||
|  |     }, | ||||||
|  |     handleTabbarPosition(i, offset) { | ||||||
|  |       const row = this.tabBar.list[i] | ||||||
|  |       this.tabBar.list.splice(i, 1, this.tabBar.list[i + offset]) | ||||||
|  |       this.tabBar.list.splice(i + offset, 1, row) | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  |  | ||||||
|  | <template> | ||||||
|  |   <ai-card :title="title" class="wxmpConfig"> | ||||||
|  |     <template #content> | ||||||
|  |       <el-form-item label="小程序AppId"> | ||||||
|  |         <el-input v-model="form.appId" clearable placeholder="小程序appId"/> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="半屏小程序"> | ||||||
|  |         <el-input v-model="form.embeddedAppIdList" clearable placeholder="如果有多个,请用英文','分割"/> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="接口是否单服务"> | ||||||
|  |         <el-checkbox v-model="form.isSingleService"/> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="引导页"> | ||||||
|  |         <el-input v-model="form.guide" placeholder="带'/'会被认为是输入的页面路径" clearable/> | ||||||
|  |       </el-form-item> | ||||||
|  |       <ai-title class="row" title="底部导航栏"> | ||||||
|  |         <el-button type="text" slot="rightBtn" icon="iconfont iconAdd" @click="tabBar.list.push({})">添加</el-button> | ||||||
|  |       </ai-title> | ||||||
|  |       <ai-table class="row" :tableData="tabBar.list" :colConfigs="colConfigs" tableSize="mini" :isShowPagination="false" border ref="TabBar"> | ||||||
|  |         <el-table-column slot="options" label="操作" width="260" align="center"> | ||||||
|  |           <template slot-scope="{row,$index}"> | ||||||
|  |             <el-row type="flex" class="tabBarOptions"> | ||||||
|  |               <ai-dialog-btn text="更换" dialogTitle="选择应用"> | ||||||
|  |                 <ai-lib-table :meta="appList" v-model="row.id" @select="v=>handleTabbarChange(row,v)" :isShowPagination="false" v-bind="$props" | ||||||
|  |                               :border="false"/> | ||||||
|  |               </ai-dialog-btn> | ||||||
|  |               <ai-dialog-btn text="编辑" dialogTitle="编辑导航栏" width="600px"> | ||||||
|  |                 <el-form-item label="名称"> | ||||||
|  |                   <el-input v-model="row.text" placeholder="请输入" clearable/> | ||||||
|  |                 </el-form-item> | ||||||
|  |                 <el-form-item label="默认图标"> | ||||||
|  |                   <el-input v-model="row.iconPath" placeholder="请输入" clearable/> | ||||||
|  |                 </el-form-item> | ||||||
|  |                 <el-form-item label="选中图标"> | ||||||
|  |                   <el-input v-model="row.selectedIconPath" placeholder="请输入" clearable/> | ||||||
|  |                 </el-form-item> | ||||||
|  |               </ai-dialog-btn> | ||||||
|  |               <el-button type="text" @click="handleTabbarDelete($index)">删除</el-button> | ||||||
|  |               <el-button type="text" @click="handleTabbarPosition($index,-1)" v-if="$index>0">上移</el-button> | ||||||
|  |               <el-button type="text" @click="handleTabbarPosition($index,1)" v-if="$index<tabBar.list.length-1">下移</el-button> | ||||||
|  |             </el-row> | ||||||
|  |           </template> | ||||||
|  |         </el-table-column> | ||||||
|  |       </ai-table> | ||||||
|  |     </template> | ||||||
|  |   </ai-card> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <style scoped lang="scss"> | ||||||
|  | .wxmpConfig { | ||||||
|  | } | ||||||
|  | </style> | ||||||
		Reference in New Issue
	
	Block a user