Commit 42931db4 authored by “yiyousong”'s avatar “yiyousong”

pref:修改列表

parent 6d9f2c01
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
.green{ .green{
color:#1BBC9B; color:#1BBC9B;
} }
.edit{
color:#03d76f;
}
.clofff{ .clofff{
color:#fff; color:#fff;
} }
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<!-- 操作 --> <!-- 操作 -->
<template slot="action" slot-scope="text"> <template slot="action" slot-scope="text">
<a-space size="middle"> <a-space size="middle">
<a class="primary" @click="handleEdit(text)">编辑</a> <a class="edit" @click="handleEdit(text)">编辑</a>
<a class="delete" @click="handleDel(text.id)">删除</a> <a class="delete" @click="handleDel(text.id)">删除</a>
</a-space> </a-space>
</template> </template>
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<!-- 操作 --> <!-- 操作 -->
<template slot="action" slot-scope="text"> <template slot="action" slot-scope="text">
<a-space size="middle"> <a-space size="middle">
<a class="primary" @click="handleEdit(text)">编辑</a> <a class="edit" @click="handleEdit(text)">编辑</a>
<a class="delete" @click="handleDel(text.id)">删除</a> <a class="delete" @click="handleDel(text.id)">删除</a>
</a-space> </a-space>
</template> </template>
...@@ -113,7 +113,7 @@ export default { ...@@ -113,7 +113,7 @@ export default {
}, },
{ {
title: "操作", title: "操作",
width: "10%", width: "110px",
scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
}, },
]; ];
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<!-- 操作 --> <!-- 操作 -->
<template slot="action" slot-scope="text"> <template slot="action" slot-scope="text">
<a-space size="middle"> <a-space size="middle">
<a class="primary" @click="handleEdit(text)">编辑</a> <a class="edit" @click="handleEdit(text)">编辑</a>
<a class="primary" @click="handleCheck(text.id)">查看</a> <a class="primary" @click="handleCheck(text.id)">查看</a>
<a <a
class="delete" class="delete"
...@@ -156,7 +156,7 @@ const columns = [ ...@@ -156,7 +156,7 @@ const columns = [
}, },
{ {
title: "操作", title: "操作",
width: "10%", width: "150px",
scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
}, },
]; ];
......
...@@ -18,15 +18,15 @@ ...@@ -18,15 +18,15 @@
v-for="(v, i) in form.appInfoFieldList" v-for="(v, i) in form.appInfoFieldList"
:key="v.fieldCode" :key="v.fieldCode"
:label="v.fieldName" :label="v.fieldName"
:class="{ content: v.fieldType == 'text' }" :class="{
content: v.fieldType == 'text',
'upload-item': v.fieldType == 'upload',
}"
:prop="`appInfoFieldList.${i}.fieldValue`" :prop="`appInfoFieldList.${i}.fieldValue`"
:rules="{ :rules="{
required: v.fieldNull ? false : true, required: v.fieldNull ? false : true,
message: `${v.fieldName}不能为空`, message: `${v.fieldName}不能为空`,
trigger: trigger: v.fieldType == 'text' ? 'blur' : 'change',
v.fieldType == 'date' || v.fieldType == 'text'
? 'change'
: 'blur',
}" }"
> >
<a-input <a-input
...@@ -53,6 +53,21 @@ ...@@ -53,6 +53,21 @@
<div v-else-if="v.fieldType == 'text'" class="content-box"> <div v-else-if="v.fieldType == 'text'" class="content-box">
<YQuillEditor v-model="v.fieldValue" height="auto"></YQuillEditor> <YQuillEditor v-model="v.fieldValue" height="auto"></YQuillEditor>
</div> </div>
<a-upload
v-else-if="v.fieldType == 'upload'"
:action="api2 + 'file/commonupload'"
:multiple="false"
:file-list="v.fileList"
@change="
(info) => {
handleChange(info, v);
}
"
>
<a-button type="primary">
<a-icon type="upload" /> 点击上传
</a-button>
</a-upload>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</div> </div>
...@@ -98,6 +113,10 @@ export default { ...@@ -98,6 +113,10 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL.includes("base")
? process.env.VUE_APP_API_BASE_URL.replace("base", "")
: process.env.VUE_APP_API_BASE_URL,
api2: process.env.VUE_APP_API_BASE_URL + "/",
labelCol: { labelCol: {
span: 2, span: 2,
}, },
...@@ -151,14 +170,44 @@ export default { ...@@ -151,14 +170,44 @@ export default {
delete v.id; delete v.id;
} }
v.fieldValue = ""; v.fieldValue = "";
if (v.fieldType == "upload") {
v.fileList = [];
}
return v; return v;
}); });
this.form.appId = this.$route.query.id; this.form.appId = this.$route.query.id;
}, },
// 编辑 // 编辑
onEdit(data) { onEdit(data) {
data.appInfoFieldList.forEach((v) => {
if (v.fieldType == "upload") {
v.fileList = [
{
uid: v.id,
name: v.fieldValue,
status: "done",
url: v.fieldValue,
},
];
}
});
this.form = { ...data }; this.form = { ...data };
}, },
// 文件上传
handleChange(info, row) {
let fileList = [...info.fileList];
fileList = fileList.slice(-1);
fileList = fileList.map((file) => {
if (file.response) {
file.url = file.response.url;
} else {
file.url = "";
}
return file;
});
row.fileList = fileList;
row.fieldValue = fileList.map((v) => v.url).join(",");
},
}, },
}; };
</script> </script>
...@@ -201,4 +250,7 @@ export default { ...@@ -201,4 +250,7 @@ export default {
display: flex; display: flex;
} }
} }
.upload-item {
display: block !important;
}
</style> </style>
\ No newline at end of file
...@@ -86,6 +86,10 @@ const fieldTypeItem = [ ...@@ -86,6 +86,10 @@ const fieldTypeItem = [
value: "text", value: "text",
label: "富文本", label: "富文本",
}, },
{
value: "upload",
label: "文件上传",
},
]; ];
export default { export default {
props: { props: {
...@@ -117,7 +121,7 @@ export default { ...@@ -117,7 +121,7 @@ export default {
fieldName: [ fieldName: [
{ required: true, message: "请输入字段名称", trigger: "blur" }, { required: true, message: "请输入字段名称", trigger: "blur" },
], ],
fieldTyp: [ fieldType: [
{ required: true, message: "请选择字段类型", trigger: "change" }, { required: true, message: "请选择字段类型", trigger: "change" },
], ],
fieldNull: [ fieldNull: [
......
...@@ -177,7 +177,7 @@ const leftColumns = [ ...@@ -177,7 +177,7 @@ const leftColumns = [
}, },
{ {
title: "操作", title: "操作",
width: "20%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
...@@ -199,7 +199,7 @@ const rightColumns = [ ...@@ -199,7 +199,7 @@ const rightColumns = [
}, },
{ {
title: "操作", title: "操作",
width: "20%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
......
...@@ -198,7 +198,7 @@ const leftColumns = [ ...@@ -198,7 +198,7 @@ const leftColumns = [
}, },
{ {
title: "操作", title: "操作",
width: "20%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
...@@ -224,7 +224,7 @@ const rightColumns = [ ...@@ -224,7 +224,7 @@ const rightColumns = [
}, },
{ {
title: "操作", title: "操作",
width: "20%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
......
...@@ -265,7 +265,7 @@ const leftColumns = [ ...@@ -265,7 +265,7 @@ const leftColumns = [
{ {
title: "操作", title: "操作",
width: "20%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
...@@ -292,7 +292,7 @@ const rightColumns = [ ...@@ -292,7 +292,7 @@ const rightColumns = [
}, },
{ {
title: "操作", title: "操作",
width: "20%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
......
...@@ -253,7 +253,7 @@ const columns = [ ...@@ -253,7 +253,7 @@ const columns = [
}, },
{ {
title: "操作", title: "操作",
width: "9%", width: "120px",
scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
}, },
]; ];
......
...@@ -218,7 +218,7 @@ const leftColumns = [ ...@@ -218,7 +218,7 @@ const leftColumns = [
}, },
{ {
title: "操作", title: "操作",
width: "12%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
......
...@@ -137,12 +137,14 @@ ...@@ -137,12 +137,14 @@
{{ text.createTime | dateFormat }} {{ text.createTime | dateFormat }}
</template> </template>
<!-- 操作 --> <!-- 操作 -->
<span slot="action" slot-scope="text"> <div slot="action" slot-scope="text">
<a class="yewu" type="primary" @click="workModal(text)">业务</a> <div class="flex flexwrap">
<a class="shixiang" @click="addWindowMatter(text)">事项</a> <a class="yewu" type="primary" @click="workModal(text)">业务</a>
<a class="edit" type="primary" @click="editModal(text)">编辑</a> <a class="shixiang" @click="addWindowMatter(text)">事项</a>
<a class="delete" @click="delWindow(text.id)">删除</a> <a class="edit" type="primary" @click="editModal(text)">编辑</a>
</span> <a class="delete" @click="delWindow(text.id)">删除</a>
</div>
</div>
</a-table> </a-table>
</div> </div>
</div> </div>
...@@ -721,7 +723,7 @@ export default { ...@@ -721,7 +723,7 @@ export default {
background-color: #fff; background-color: #fff;
} }
.edit { .edit {
color: rgb(41, 184, 41); color: #03d76f;
margin-right: 5px; margin-right: 5px;
} }
.delete { .delete {
......
...@@ -63,8 +63,10 @@ ...@@ -63,8 +63,10 @@
</template> </template>
<!-- 操作 --> <!-- 操作 -->
<template slot="action" slot-scope="text"> <template slot="action" slot-scope="text">
<a type="primary" @click="handleEdit(text)" class="edit">编辑</a> <a-space>
<a class="delet" @click="handleDel(text.id)">删除</a> <a @click="handleEdit(text)" class="edit">编辑</a>
<a class="delet" @click="handleDel(text.id)">删除</a>
</a-space>
</template> </template>
</a-table> </a-table>
</div> </div>
...@@ -123,7 +125,7 @@ const columns = [ ...@@ -123,7 +125,7 @@ const columns = [
}, },
{ {
title: "操作", title: "操作",
width: "10%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
...@@ -289,8 +291,7 @@ export default { ...@@ -289,8 +291,7 @@ export default {
letter-spacing: normal; letter-spacing: normal;
} }
.edit { .edit {
color: rgb(41, 184, 41); color: #03d76f;
margin-right: 40px;
} }
.delet { .delet {
color: red; color: red;
......
...@@ -258,7 +258,7 @@ const leftColumns = [ ...@@ -258,7 +258,7 @@ const leftColumns = [
}, },
{ {
title: "操作", title: "操作",
width: "20%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
...@@ -307,7 +307,7 @@ const rightColumns = [ ...@@ -307,7 +307,7 @@ const rightColumns = [
}, },
{ {
title: "操作", title: "操作",
width: "20%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
......
...@@ -231,7 +231,7 @@ const columns = [ ...@@ -231,7 +231,7 @@ const columns = [
{ {
title: "操作", title: "操作",
width: "12%", width: "160px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
...@@ -533,7 +533,7 @@ export default { ...@@ -533,7 +533,7 @@ export default {
object-fit: cover; object-fit: cover;
} }
.edit { .edit {
color: #1bbc9b; color: #03d76f;
} }
.edit-pwd { .edit-pwd {
color: #1890ff; color: #1890ff;
......
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