|
|
|
@ -8,7 +8,8 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="topright">
|
|
|
|
|
<el-button type="primary" size="medium" plain
|
|
|
|
|
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="dialogVisible = true">
|
|
|
|
|
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;"
|
|
|
|
|
@click="dialogVisible = true">
|
|
|
|
|
<img src="../../../assets/images/detailsicon/icon-xz@2x.png" alt="编辑"
|
|
|
|
|
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
|
|
|
|
|
新增
|
|
|
|
@ -24,19 +25,62 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 新增项目巡礼的弹窗 -->
|
|
|
|
|
<!-- 弹窗 -->
|
|
|
|
|
<el-dialog title="上传附件" :visible.sync="dialogVisible" width="50%">
|
|
|
|
|
|
|
|
|
|
<el-form :model="form" label-width="100px">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="项目名称">
|
|
|
|
|
<el-input v-model="form.projectName" placeholder="请输入项目名称"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="年度">
|
|
|
|
|
<el-input v-model="form.year" placeholder="请输入年度"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-form-item label="网页地址">
|
|
|
|
|
<el-input v-model="form.webAddress" placeholder="请输入网页地址"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="时间">
|
|
|
|
|
<el-date-picker v-model="form.time" type="datetime" placeholder="选择日期时间"></el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="图片上传">
|
|
|
|
|
<el-upload action="https://jsonplaceholder.typicode.com/posts/" list-type="picture-card"
|
|
|
|
|
:on-preview="handlePictureCardPreview" :on-remove="handleRemove" :before-upload="beforeUpload">
|
|
|
|
|
<i class="el-icon-plus"></i>
|
|
|
|
|
</el-upload>
|
|
|
|
|
<el-dialog :visible.sync="dialogImageUrlVisible">
|
|
|
|
|
<img width="100%" :src="dialogImageUrl" alt="">
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="说明">
|
|
|
|
|
<el-input v-model="form.description" type="textarea" :rows="4" placeholder="请输入说明"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="大事记">
|
|
|
|
|
<el-input v-model="form.majorEvents" type="textarea" :rows="4" placeholder="请输入大事记"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="新闻事件">
|
|
|
|
|
<el-input v-model="form.newsEvents" type="textarea" :rows="4" placeholder="请输入新闻事件"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="附件上传">
|
|
|
|
|
<el-upload action="https://jsonplaceholder.typicode.com/posts/" :on-preview="handleFilePreview"
|
|
|
|
|
:on-remove="handleRemove" :before-upload="beforeUpload">
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="submitUpload">确 定</el-button>
|
|
|
|
|
<el-button type="primary" @click="handleAddElement">确 定</el-button>
|
|
|
|
|
</span>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
// import { addXmxl, getXmxlPage } from '@/api/ManageApi/index.js';
|
|
|
|
|
import { getXmxlPage } from '@/api/ManageApi/index.js';
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
@ -49,15 +93,16 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.fetchImages();
|
|
|
|
|
const xmid = this.$route.query.xmid;
|
|
|
|
|
this.fetchImages(xmid);
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
async fetchImages() {
|
|
|
|
|
async fetchImages(xmid) {
|
|
|
|
|
try {
|
|
|
|
|
const response = await getXmxlPage();
|
|
|
|
|
const response = await getXmxlPage({ xmid });
|
|
|
|
|
if (response.data && response.data.list) {
|
|
|
|
|
this.images = response.data.list.map(item => ({
|
|
|
|
|
src: item.fj // 假设 fj 字段包含图片 URL
|
|
|
|
|
src: item.fj
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|