From e016353b27ac0694d52966b9e573dc8d5beb3359 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 16 五月 2024 14:33:23 +0800
Subject: [PATCH] ''
---
admin/src/components/common/GlobalWindow.vue | 2
admin/src/views/task/taskDetail.vue | 115 ++++++++++++++++++++++++++++
admin/src/views/application/index.vue | 79 +++++++++++++++++++
admin/vue.config.js | 16 +++
4 files changed, 208 insertions(+), 4 deletions(-)
diff --git a/admin/src/components/common/GlobalWindow.vue b/admin/src/components/common/GlobalWindow.vue
index c1d0c9c..359891b 100644
--- a/admin/src/components/common/GlobalWindow.vue
+++ b/admin/src/components/common/GlobalWindow.vue
@@ -21,6 +21,7 @@
<div v-if="withFooter" class="window__footer">
<slot name="footer">
<el-button @click="confirm" :loading="confirmWorking" type="primary">{{text}}</el-button>
+ <slot name="btns" />
<el-button @click="close">{{ backText }}</el-button>
</slot>
</div>
@@ -70,6 +71,7 @@
this.$emit('confirm')
},
close () {
+ this.$emit('close')
this.$emit('update:visible', false)
}
}
diff --git a/admin/src/views/application/index.vue b/admin/src/views/application/index.vue
new file mode 100644
index 0000000..bcf546e
--- /dev/null
+++ b/admin/src/views/application/index.vue
@@ -0,0 +1,79 @@
+<template>
+ <div class="main_app">
+ <div class="one_level" v-for="(menu, i) in dataList" :key="i">
+ <div class="title">
+ {{ menu.name }}
+ </div>
+ <div class="list">
+ <div class="item" @click="handleClick(item)" v-for="item in menu.children" :key="item.name">
+ <img src="" alt="" class="icon" />
+ <div class="name">{{ item.name }}</div>
+ </div>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script>
+export default {
+ data () {
+ return {
+ dataList: [
+ {
+ name: '涓氬姟涓績',
+ children: [
+ { name: '鐢ㄨ溅鐢宠璁板綍', url: '' },
+ { name: '浼氳瀹ら绾﹁褰�', url: '' },
+ { name: '闅忔偅闅忔墜鎷嶈褰�', url: '' },
+ { name: '鐢ㄩ璁板綍', url: '' },
+ { name: 'dddd', url: '' }
+ ]
+ },
+ {
+ name: '鏈堝彴涓績',
+ children: [
+ { name: '鐢ㄨ溅鐢宠璁板綍', url: '' },
+ { name: '浼氳瀹ら绾﹁褰�', url: '' },
+ { name: '闅忔偅闅忔墜鎷嶈褰�', url: '' },
+ { name: '鐢ㄩ璁板綍', url: '' },
+ { name: 'dddd', url: '' }
+ ]
+ }
+ ]
+ }
+ },
+ methods: {
+ handleClick (item) {
+ console.log(item)
+ }
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+.one_level {
+ padding: 16px 0;
+ .title {
+ font-size: 16px;
+ font-weight: 600;
+ border-bottom: 1px solid #cccccc;
+ padding: 12px 16px;
+ margin-bottom: 20px;
+ }
+ .list {
+ display: flex;
+ flex-wrap: wrap;
+ .item {
+ display: flex;
+ align-items: center;
+ margin-bottom: 20px;
+ width: 25%;
+ .icon {
+ width: 60px;
+ height: 60px;
+ margin-right: 12px;
+ }
+ }
+ }
+}
+</style>
diff --git a/admin/src/views/task/taskDetail.vue b/admin/src/views/task/taskDetail.vue
index a3aea6c..3337491 100644
--- a/admin/src/views/task/taskDetail.vue
+++ b/admin/src/views/task/taskDetail.vue
@@ -5,6 +5,7 @@
backText="鎷掔粷"
:visible.sync="isShowModal"
@confirm="confirm"
+ @close="reject"
>
<div class="modal_wrap">
<div class="modal_content">
@@ -65,7 +66,11 @@
<el-table-column label="璇佷欢绫诲瀷" prop="" min-width="80" />
<el-table-column label="璇佷欢鍙风爜" prop="" min-width="120" />
<el-table-column label="鍏徃鍚嶇О" prop="" min-width="120" />
- <el-table-column label="浜鸿劯鐓х墖" prop="" min-width="80" />
+ <el-table-column label="浜鸿劯鐓х墖" prop="" min-width="80">
+ <template slot-scope="{ row }">
+ <el-image :src="row.url" :preview-src-list="[row.url]"> </el-image>
+ </template>
+ </el-table-column>
</el-table>
</div>
</div>
@@ -110,6 +115,79 @@
</div>
</div>
</div>
+ <!-- -->
+ <template #btns>
+ <el-button type="primary" plain @click="handleTransfer">杞氦</el-button>
+ </template>
+ <!-- 鍚屾剰/鎷掔粷 -->
+ <el-dialog
+ append-to-body
+ :title="apprTitle"
+ :visible.sync="isShowAppr"
+ width="480px"
+ >
+ <el-input
+ type="textarea"
+ :placeholder="apprTitle + '璇存槑锛岄潪蹇呭~'"
+ :rows="4"
+ v-model="param.explain"
+ />
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="isShowAppr = false">鍙栨秷</el-button>
+ <el-button type="primary" @click="isShowAppr = false">纭畾</el-button>
+ </span>
+ </el-dialog>
+ <!-- 闅愭偅 -->
+ <el-dialog
+ append-to-body
+ title="闅愭偅"
+ :visible.sync="isShowProblem"
+ width="480px"
+ >
+ <el-form :model="param" :rules="rules" ref="ruleForm" label-width="100px">
+ <el-form-item label="閫�鍥炴椂闂�">
+ <el-date-picker
+ class="w300"
+ value-format="yyyy-MM-dd"
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ v-model="param.date"
+ />
+ </el-form-item>
+ <el-form-item label="鏁存敼鍓�">
+ <div class="df_ac">
+ <img src="@/assets/avatar/man.png" />
+ <el-upload
+ class="avatar-uploader"
+ action="https://jsonplaceholder.typicode.com/posts/"
+ :show-file-list="false"
+ :on-success="handleAvatarSuccess"
+ :before-upload="beforeAvatarUpload"
+ >
+ <img v-if="param.url" :src="param.url" class="avatar" />
+ <div v-else class="upload_box">
+ <el-icon class="el-icon-plus icon" />
+ <div class="text">鍥剧墖/瑙嗛</div>
+ </div>
+ </el-upload>
+ </div>
+ </el-form-item>
+ <el-form-item label="閫�鍥炶鏄�">
+ <el-input
+ type="textarea"
+ placeholder="璇峰~鍐欒鏄�"
+ :rows="4"
+ v-model="param.explain"
+ />
+ </el-form-item>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="isShowProblem = false">鍙栨秷</el-button>
+ <el-button type="primary" @click="isShowProblem = false"
+ >纭畾</el-button
+ >
+ </span>
+ </el-dialog>
</GlobalWindow>
</template>
@@ -123,18 +201,49 @@
isShowModal: false,
detail: {
datalist: [{}]
- }
+ },
+
+ isShowAppr: false,
+ apprTitle: '鍚屾剰',
+ param: {},
+
+ isShowProblem: false,
+ rules: {}
}
},
methods: {
confirm() {
console.log('--')
- }
+ },
+ handleTransfer() {
+ this.isShowProblem = true
+ },
+ reject() { },
+ handleAvatarSuccess() { },
+ beforeAvatarUpload() { }
}
}
</script>
<style lang="scss" scoped>
+.upload_box {
+ width: 84px;
+ height: 84px;
+ border-radius: 4px;
+ background-color: #f7f7f7;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ color: #999999;
+ border: 1px solid #e4e4e4;
+ .icon {
+ font-size: 24px;
+ }
+ .text {
+ font-size: 12px;
+ }
+}
.modal_wrap {
display: flex;
height: 100%;
diff --git a/admin/vue.config.js b/admin/vue.config.js
index efad125..ee1ea41 100644
--- a/admin/vue.config.js
+++ b/admin/vue.config.js
@@ -1,5 +1,10 @@
// 璇︾粏閰嶇疆璇峰弬鑰僪ttps://cli.vuejs.org/zh/config/#vue-config-js
// const outputDir = process.env.VUE_APP_CONTEXT_PATH.substring(1, process.env.VUE_APP_CONTEXT_PATH.length - 1)
+const path = require('path')
+
+function resolve (dir) {
+ return path.join(__dirname, dir)
+}
module.exports = {
publicPath: process.env.VUE_APP_CONTEXT_PATH,
outputDir: 'admin',
@@ -13,9 +18,18 @@
target: process.env.VUE_APP_API_URL,
changeOrigin: true,
pathRewrite: {
- [`^${[process.env.VUE_APP_API_PREFIX]}`]: ''
+ [`^${[process.env.VUE_APP_API_PREFIX]}`]: ''
}
}
}
+ },
+ configureWebpack: {
+ // provide the app's title in webpack's name field, so that
+ // it can be accessed in index.html to inject the correct title.
+ resolve: {
+ alias: {
+ '@': resolve('src')
+ }
+ }
}
}
--
Gitblit v1.9.3