|
@@ -0,0 +1,141 @@
|
|
|
+<template>
|
|
|
+ <a-modal
|
|
|
+ title="申请下载"
|
|
|
+ :width="500"
|
|
|
+ :visible="options.visible"
|
|
|
+ :ok-text="'提交审核'"
|
|
|
+ :cancel-text="'取消'"
|
|
|
+ @cancel="close()"
|
|
|
+ @ok="submitForm"
|
|
|
+ :closable="true">
|
|
|
+ <a-form ref="formRef" :model="formState">
|
|
|
+ <a-divider orientation="left">申请原因</a-divider>
|
|
|
+ <a-form-item name="comment"
|
|
|
+ :rules="[{ required: true, message: '请填写申请原因' }]">
|
|
|
+ <a-textarea :auto-size="{ minRows: 2, maxRows:4 }" v-model:value="formState.comment" placeholder=""/>
|
|
|
+ </a-form-item>
|
|
|
+ <a-divider orientation="left">流程信息</a-divider>
|
|
|
+ <a-timeline>
|
|
|
+ <a-timeline-item>
|
|
|
+ <template #dot>
|
|
|
+ <CheckCircleTwoTone twoToneColor="#52c41a" style="font-size: 16px"/>
|
|
|
+ </template>
|
|
|
+ <p style="color: gray">开始</p>
|
|
|
+ <p style="color: gray">提交下载申请</p>
|
|
|
+ </a-timeline-item>
|
|
|
+ <a-timeline-item>
|
|
|
+ <template #dot>
|
|
|
+ <SyncOutlined twoToneColor="#52c41a" spin style="font-size: 16px"/>
|
|
|
+ </template>
|
|
|
+ <p><b>下一步处理人</b></p>
|
|
|
+ <div class="user-content">
|
|
|
+ <div class="user-item" v-for="it in userList" @click="it.checked=!it.checked"
|
|
|
+ :style="{ borderColor: it.checked?'#50a14f':'#eef0f4'}">
|
|
|
+ <a-avatar style="background-color: #87d068">
|
|
|
+ <template #icon>
|
|
|
+ <UserOutlined />
|
|
|
+ </template>
|
|
|
+ </a-avatar>{{ it.Name }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </a-timeline-item>
|
|
|
+ <a-timeline-item color="red">
|
|
|
+ <template #dot>
|
|
|
+ <HistoryOutlined style="font-size: 16px"/>
|
|
|
+ </template>
|
|
|
+ <p style="color: gray">结束</p>
|
|
|
+ <p style="color: gray">审核结束,下载数据</p>
|
|
|
+ </a-timeline-item>
|
|
|
+ </a-timeline>
|
|
|
+ </a-form>
|
|
|
+ </a-modal>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="ts">
|
|
|
+import {defineComponent, ref, reactive} from "vue";
|
|
|
+import {Modal} from "ant-design-vue";
|
|
|
+import {save} from '@/api/common';
|
|
|
+import {getUserListPage} from "@/api/system/user";
|
|
|
+
|
|
|
+export default defineComponent({
|
|
|
+ name: 'Apply',
|
|
|
+ props: {
|
|
|
+ options: {type: Object, default: {}}
|
|
|
+ },
|
|
|
+ emits: [
|
|
|
+ "close", "ok"
|
|
|
+ ],
|
|
|
+ setup(props, {emit}) {
|
|
|
+ console.log(props, emit);
|
|
|
+ const formRef = ref();
|
|
|
+ const formState = reactive({
|
|
|
+ comment: ''
|
|
|
+ });
|
|
|
+ const userList = ref([]);
|
|
|
+
|
|
|
+ const getUserList = async function () {
|
|
|
+ const result: any = await getUserListPage({page: 1, limit: 20});
|
|
|
+
|
|
|
+ userList.value = result.list;
|
|
|
+ }
|
|
|
+
|
|
|
+ const submitForm = () => {
|
|
|
+ if (formRef.value == undefined) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ formRef.value.validate().then(() => {
|
|
|
+ save('', {}).then(data => {
|
|
|
+ if (data) {
|
|
|
+ Modal.info({
|
|
|
+ title: '提示',
|
|
|
+ content: '提交成功',
|
|
|
+ onOk() {
|
|
|
+ closing();
|
|
|
+ emit('ok');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }).catch((error) => {
|
|
|
+ console.log('error', error);
|
|
|
+ });
|
|
|
+ };
|
|
|
+ const closing = () => {
|
|
|
+ formRef.value?.clearValidate();
|
|
|
+ props.options.visible = false;
|
|
|
+ formState.comment = '';
|
|
|
+ };
|
|
|
+ const close = () => {
|
|
|
+ closing();
|
|
|
+ emit('close');
|
|
|
+ };
|
|
|
+
|
|
|
+ return {
|
|
|
+ formRef, close,
|
|
|
+ formState, getUserList,userList,
|
|
|
+ submitForm,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getUserList();
|
|
|
+ }
|
|
|
+})
|
|
|
+</script>
|
|
|
+<style lang="less" scoped>
|
|
|
+.user-content {
|
|
|
+ display: flex;
|
|
|
+ width: 100%;
|
|
|
+ grid-gap: 10px 10px;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ margin-top: 10px;
|
|
|
+
|
|
|
+ .user-item {
|
|
|
+ width: 22%;
|
|
|
+ border: 2px solid #eef0f4;
|
|
|
+ height: 50px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ padding-left: 5px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|