Commit 9462a2ef authored by “yiyousong”'s avatar “yiyousong”

pref:修改新增应用

parent b5d77aa8
...@@ -3,6 +3,28 @@ ...@@ -3,6 +3,28 @@
<!-- 头部 --> <!-- 头部 -->
<div class="header flex aic jcb mb20"> <div class="header flex aic jcb mb20">
<a-button type="primary" @click="handleAdd">新增</a-button> <a-button type="primary" @click="handleAdd">新增</a-button>
<div class="search-box">
<a-input-group compact>
<a-select style="min-width: 100px" v-model="fieldCode">
<a-select-option value=""> 全部 </a-select-option>
<a-select-option
v-for="v in appTemplate"
:key="v.id"
:value="v.fieldCode"
>
{{ v.fieldName }}
</a-select-option>
</a-select>
<a-input-search
style="width: 300px"
placeholder="请输入关键字搜索"
enter-button="搜索"
v-model="searchVal"
allowClear
@search="onSearch"
/>
<!-- <a-input style="width: 50%" default-value="Xihu District, Hangzhou" /> -->
</a-input-group>
<!-- <a-input-search <!-- <a-input-search
style="width: 300px" style="width: 300px"
placeholder="请输入标题关键字搜索" placeholder="请输入标题关键字搜索"
...@@ -12,6 +34,7 @@ ...@@ -12,6 +34,7 @@
@search="onSearch" @search="onSearch"
/> --> /> -->
</div> </div>
</div>
<!-- 表格 --> <!-- 表格 -->
<div class="table-content"> <div class="table-content">
<a-table <a-table
...@@ -86,6 +109,7 @@ export default { ...@@ -86,6 +109,7 @@ export default {
tableData: [], tableData: [],
AddVisible: false, AddVisible: false,
title: "", title: "",
fieldCode: "",
}; };
}, },
computed: { computed: {
...@@ -119,6 +143,7 @@ export default { ...@@ -119,6 +143,7 @@ export default {
}, },
created() { created() {
this.getDatasetList(); this.getDatasetList();
console.log(this.appTemplate);
}, },
methods: { methods: {
// 获取数据列表 // 获取数据列表
...@@ -128,6 +153,8 @@ export default { ...@@ -128,6 +153,8 @@ export default {
page: this.current, page: this.current,
size: this.size, size: this.size,
appId: this.appId, appId: this.appId,
fieldCode: this.fieldCode,
fieldValue: this.searchVal,
}); });
this.loading = false; this.loading = false;
if (res.data.code === 1) { if (res.data.code === 1) {
...@@ -208,4 +235,8 @@ export default { ...@@ -208,4 +235,8 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.ant-input-group {
display: flex;
justify-content: flex-end;
}
</style> </style>
\ No newline at end of file
...@@ -23,9 +23,6 @@ ...@@ -23,9 +23,6 @@
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
current: current, current: current,
total: total, total: total,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onChange: handleChange, onChange: handleChange,
onShowSizeChange: showSizeChange, onShowSizeChange: showSizeChange,
}" }"
...@@ -33,9 +30,7 @@ ...@@ -33,9 +30,7 @@
:rowKey="(record) => record.id" :rowKey="(record) => record.id"
> >
<!-- 序号 --> <!-- 序号 -->
<span slot="num" slot-scope="text, record, index">{{ <span slot="num" slot-scope="text, record, index">{{ index + 1 }}</span>
(current - 1) * size + index + 1
}}</span>
<!-- 允许为空 --> <!-- 允许为空 -->
<template slot="fieldNull" slot-scope="text"> <template slot="fieldNull" slot-scope="text">
<a-tag v-if="text.fieldNull === 1" color="green"></a-tag> <a-tag v-if="text.fieldNull === 1" color="green"></a-tag>
...@@ -126,9 +121,9 @@ export default { ...@@ -126,9 +121,9 @@ export default {
columns, columns,
loading: false, loading: false,
current: 1, current: 1,
size: 10, size: -1,
total: 100, total: 0,
pageSizeOptions: ["10", "30", "50", "100"], // pageSizeOptions: ["10", "30", "50", "100"],
searchVal: "", searchVal: "",
tableData: [], tableData: [],
fieldVisible: false, fieldVisible: false,
......
...@@ -87,6 +87,7 @@ ...@@ -87,6 +87,7 @@
class="upload-app" class="upload-app"
label="上传应用" label="上传应用"
prop="filePath" prop="filePath"
v-if="form.appType === 1"
> >
<a-upload <a-upload
name="file" name="file"
...@@ -97,10 +98,13 @@ ...@@ -97,10 +98,13 @@
accept="application/x-zip-compressed" accept="application/x-zip-compressed"
> >
<a-button type="primary"> <a-button type="primary">
<a-icon type="upload" /> 选择文件 <a-icon type="upload" /> .zip文件
</a-button> </a-button>
</a-upload> </a-upload>
</a-form-model-item> </a-form-model-item>
<a-form-model-item v-else label="应用URL" prop="url">
<a-input v-model="form.url" placeholder="请输入应用URL" />
</a-form-model-item>
<a-form-model-item label="更新说明" prop="notes"> <a-form-model-item label="更新说明" prop="notes">
<a-textarea <a-textarea
placeholder="请输入更新说明" placeholder="请输入更新说明"
...@@ -184,10 +188,11 @@ export default { ...@@ -184,10 +188,11 @@ export default {
appIconPath: "", // 应用图标 appIconPath: "", // 应用图标
appThemeName: "", // 应用主题名称 appThemeName: "", // 应用主题名称
type: 1, // 类型(1.终端应用,2.移动端应用) type: 1, // 类型(1.终端应用,2.移动端应用)
appType: "", // 类型(1.应用程序,2.url) appType: 1, // 类型(1.应用程序,2.url)
shelves: 0, shelves: 0,
fileName: "", // 文件名称 fileName: "", // 文件名称
filePath: "", // 文件相对路径地址 filePath: "", // 文件相对路径地址
url: "", // 应用url
summary: "", // 简介 summary: "", // 简介
notes: "", // 更新说明 notes: "", // 更新说明
dataUpdate: 0, // 是否数据更新(0.否,1.是) dataUpdate: 0, // 是否数据更新(0.否,1.是)
...@@ -217,6 +222,7 @@ export default { ...@@ -217,6 +222,7 @@ export default {
summary: [ summary: [
{ required: true, message: "请输入应用简介", trigger: "blur" }, { required: true, message: "请输入应用简介", trigger: "blur" },
], ],
url: [{ required: true, message: "请输入应用URL", trigger: "blur" }],
notes: [ notes: [
{ required: true, message: "请输入应用更新说明", trigger: "blur" }, { required: true, message: "请输入应用更新说明", trigger: "blur" },
], ],
......
...@@ -66,7 +66,6 @@ export default { ...@@ -66,7 +66,6 @@ export default {
if (this.siteId) { if (this.siteId) {
switch (key) { switch (key) {
case 1: case 1:
console.log(this.siteId);
this.$refs.BusinessTabs1.getSiteInfo(this.siteId); this.$refs.BusinessTabs1.getSiteInfo(this.siteId);
break; break;
case 2: case 2:
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
total: leftTotal, total: leftTotal,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
defaultPageSize: leftSize,
pageSizeOptions: pageSizeOptions, pageSizeOptions: pageSizeOptions,
onChange: changeLeft, onChange: changeLeft,
onShowSizeChange: showSizeChange, onShowSizeChange: showSizeChange,
......
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