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

pref:修改新增应用

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