Browse Source

承诺书

master
“wangzihua” 3 months ago
parent
commit
eff07ea1c6
  1. BIN
      dist.zip
  2. 15
      src/views/business/erp/goods/goods-list.vue
  3. 63
      src/views/business/erp/service/service-applications-list.vue
  4. 63
      src/views/system/home/components/agreement-modal.vue
  5. 8
      vite.config.js

BIN
dist.zip

Binary file not shown.

15
src/views/business/erp/goods/goods-list.vue

@ -7,7 +7,7 @@
<a-row class="smart-query-form-row" v-privilege="'goods:query'"> <a-row class="smart-query-form-row" v-privilege="'goods:query'">
<a-form-item label="活动分类" class="smart-query-form-item"> <a-form-item label="活动分类" class="smart-query-form-item">
<category-tree <category-tree
width="150px" width="250px"
v-model:value="queryForm.categoryId" v-model:value="queryForm.categoryId"
placeholder="请选择活动分类" placeholder="请选择活动分类"
:categoryType="CATEGORY_TYPE_ENUM.GOODS.value" :categoryType="CATEGORY_TYPE_ENUM.GOODS.value"
@ -15,8 +15,8 @@
/> />
</a-form-item> </a-form-item>
<a-form-item label="活动名称" class="smart-query-form-item"> <a-form-item style="margin-left:100px;width: 300px" label="活动名称" class="smart-query-form-item">
<a-input style="width: 200px" v-model:value="queryForm.searchWord" placeholder="活动名称" /> <a-input v-model:value="queryForm.searchWord" placeholder="活动名称" />
</a-form-item> </a-form-item>
<a-form-item label="快速筛选" class="smart-query-form-item"> <a-form-item label="快速筛选" class="smart-query-form-item">
@ -174,14 +174,14 @@
<style scoped> <style scoped>
.category-search-select { .category-search-select {
max-width: 150px; max-width: 180px;
} }
.category-search-select :deep(.ant-select-selection-item) { .category-search-select :deep(.ant-select-selection-item) {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
max-width: 80px; /* 限制宽度,大约显示6个中文字符 */ max-width: 300px; /* 限制宽度,大约显示6个中文字符 */
position: relative; position: relative;
} }
@ -227,7 +227,7 @@
dataIndex: 'categoryName', dataIndex: 'categoryName',
resizable: true, resizable: true,
sorter: true, sorter: true,
width: 150, width: 250,
ellipsis: true, ellipsis: true,
customRender: ({ text }) => { customRender: ({ text }) => {
return { return {
@ -243,7 +243,8 @@
dataIndex: 'goodsName', dataIndex: 'goodsName',
resizable: true, resizable: true,
sorter: true, sorter: true,
width: 150, width: 300,
ellipsis: true,
}, },
{ {
title: '小时(次)', title: '小时(次)',

63
src/views/business/erp/service/service-applications-list.vue

@ -260,6 +260,7 @@
</div> </div>
<ServiceApplicationsForm ref="formRef" @reloadList="queryData"/> <ServiceApplicationsForm ref="formRef" @reloadList="queryData"/>
<AgreementModal ref="agreementModalRef" @confirm="handleAgreementConfirm" />
<!-- 导入弹窗 --> <!-- 导入弹窗 -->
<a-modal v-model:open="importModalShowFlag" title="导入" @onCancel="hideImportModal" @ok="hideImportModal"> <a-modal v-model:open="importModalShowFlag" title="导入" @onCancel="hideImportModal" @ok="hideImportModal">
@ -311,6 +312,7 @@ import { employeeApi } from '/@/api/system/employee-api';
import { REVIEW_ENUM } from '/@/constants/system/review-const'; import { REVIEW_ENUM } from '/@/constants/system/review-const';
import { PlusOutlined, DeleteOutlined, SendOutlined, ImportOutlined, ExportOutlined, DownloadOutlined, UploadOutlined, CheckCircleOutlined } from '@ant-design/icons-vue'; import { PlusOutlined, DeleteOutlined, SendOutlined, ImportOutlined, ExportOutlined, DownloadOutlined, UploadOutlined, CheckCircleOutlined } from '@ant-design/icons-vue';
import { loginApi } from '/@/api/system/login-api'; import { loginApi } from '/@/api/system/login-api';
import AgreementModal from '/@/views/system/home/components/agreement-modal.vue';
// ---------------------------- ---------------------------- // ---------------------------- ----------------------------
const columns = ref([ const columns = ref([
@ -497,7 +499,6 @@ import { loginApi } from '/@/api/system/login-api';
// cto // cto
isCtoRole.value = roleLower === 'cto'; isCtoRole.value = roleLower === 'cto';
//
// //
isAssociationRole.value = roleLower.includes('协会') || isAssociationRole.value = roleLower.includes('协会') ||
roleLower.includes('association') || roleLower.includes('association') ||
@ -513,26 +514,24 @@ import { loginApi } from '/@/api/system/login-api';
// CEOCEO // CEOCEO
isCeo.value = roleLower === 'ceo'; isCeo.value = roleLower === 'ceo';
// CEOCEO console.log('用户角色:', userRole, '不是user:', isNotUser.value, '是cto:', isCtoRole.value, '是协会角色:', isAssociationRole.value, '是CEO:', isCeo.value);
isCeo.value = roleLower === 'ceo'; }
}
// CEOCEO
isCeo.value = roleLower === 'ceo';
// CEOCEO
isCeo.value = roleLower === 'ceo';
// CEOCEO
isCeo.value = roleLower === 'ceo';
// CEOCEO //
isCeo.value = roleLower === 'ceo'; function checkUserSigned() {
if (!loginInfo.value) {
console.log('未获取到登录信息');
return false;
}
// CEO // agreementSignFlag
isCeo.value = roleLower === 'ceo'; const agreementSignFlag = loginInfo.value.agreementSignFlag;
console.log('用户签约状态 agreementSignFlag:', agreementSignFlag);
console.log('用户角色:', userRole, '不是user:', isNotUser.value, '是cto:', isCtoRole.value, '是协会角色:', isAssociationRole.value, '是CEO:', isCeo.value); // true
} // falseundefined
return agreementSignFlag === true;
} }
// //
@ -801,11 +800,39 @@ onMounted(async () => {
queryData(); queryData();
}); });
// ---------------------------- ----------------------------
const agreementModalRef = ref();
const pendingFormData = ref(null); //
//
function showAgreementModal(data) {
pendingFormData.value = data;
agreementModalRef.value.showDrawer();
}
//
function handleAgreementConfirm() {
//
if (pendingFormData.value) {
formRef.value.show(pendingFormData.value);
} else {
formRef.value.show();
}
pendingFormData.value = null;
}
// ---------------------------- / ---------------------------- // ---------------------------- / ----------------------------
const formRef = ref(); const formRef = ref();
function showForm(data) { function showForm(data) {
//
if (checkUserSigned()) {
//
formRef.value.show(data); formRef.value.show(data);
} else {
//
showAgreementModal(data);
}
} }
// ---------------------------- ---------------------------- // ---------------------------- ----------------------------

63
src/views/system/home/components/agreement-modal.vue

@ -20,38 +20,14 @@
</div> </div>
<div class="content-html" v-html="noticeDetail.contentHtml"></div> <div class="content-html" v-html="noticeDetail.contentHtml"></div>
<div v-if="!noticeDetail.contentHtml" class="default-content"> <div v-if="!noticeDetail.contentHtml" class="default-content">
<p>欢迎使用本系统在开始使用前请仔细阅读以下协议内容</p>
<h4>服务条款</h4>
<p>1. 您在使用本系统时必须遵守相关法律法规和平台规定</p>
<p>2. 不得利用本系统从事任何违法或不当行为</p>
<h4>隐私政策</h4>
<p>1. 我们将保护您的个人信息安全仅用于系统功能使用</p>
<p>2. 未经您同意我们不会向第三方泄露您的个人信息</p>
<h4>使用规范</h4>
<p>1. 请妥善保管您的账号密码避免泄露</p>
<p>2. 如发现异常情况请及时联系系统管理员</p>
</div> </div>
<p class="important">请仔细阅读以上协议内容点击"同意并继续"表示您已阅读并同意本协议</p> <p class="important">请仔细阅读以上协议内容点击"同意并继续"表示您已阅读并同意本协议</p>
</div> </div>
<div v-else class="agreement-text"> <div v-else class="agreement-text">
<h3>用户协议与隐私政策</h3> <h3>用户协议与隐私政策</h3>
<div class="default-content"> <div class="default-content">
<p>欢迎使用本系统在开始使用前请仔细阅读以下协议内容</p>
<h4>服务条款</h4>
<p>1. 您在使用本系统时必须遵守相关法律法规和平台规定</p>
<p>2. 不得利用本系统从事任何违法或不当行为</p>
<h4>隐私政策</h4>
<p>1. 我们将保护您的个人信息安全仅用于系统功能使用</p>
<p>2. 未经您同意我们不会向第三方泄露您的个人信息</p>
<h4>使用规范</h4>
<p>1. 请妥善保管您的账号密码避免泄露</p>
<p>2. 如发现异常情况请及时联系系统管理员</p>
</div> </div>
<p class="important">请仔细阅读以上协议内容点击"同意并继续"表示您已阅读并同意本协议</p> <p class="important">请仔细阅读以上协议内容点击"同意并继续"表示您已阅读并同意本协议</p>
</div> </div>
@ -74,11 +50,15 @@
</template> </template>
<script setup> <script setup>
import { ref, onMounted, reactive } from 'vue'; import { ref, reactive } from 'vue';
import { useRouter } from 'vue-router';
import { message } from 'ant-design-vue';
import { noticeApi } from '/@/api/business/oa/notice-api'; import { noticeApi } from '/@/api/business/oa/notice-api';
import { letterApi } from '/@/api/business/letter/letter-api';
import { smartSentry } from '/@/lib/smart-sentry'; import { smartSentry } from '/@/lib/smart-sentry';
const emit = defineEmits(['confirm', 'cancel']); const emit = defineEmits(['confirm', 'cancel']);
const router = useRouter();
const visible = ref(false); const visible = ref(false);
const loading = ref(false); const loading = ref(false);
@ -94,11 +74,19 @@ const noticeDetail = reactive({
publishTime: '' publishTime: ''
}); });
onMounted(() => { //
function showDrawer() {
visible.value = true; visible.value = true;
//
hasScrolledToBottom.value = false;
// //
getFirstNoticeDetail(); getFirstNoticeDetail();
}); }
//
function hideDrawer() {
visible.value = false;
}
// //
function handleScroll(event) { function handleScroll(event) {
@ -137,15 +125,34 @@ async function getFirstNoticeDetail() {
} }
} }
const handleConfirm = () => { const handleConfirm = async () => {
try {
//
await letterApi.add();
message.success('承诺书签署成功');
//
emit('confirm'); emit('confirm');
visible.value = false; visible.value = false;
} catch (error) {
message.error('承诺书签署失败,请稍后重试');
//
visible.value = false;
}
}; };
const handleCancel = () => { const handleCancel = () => {
emit('cancel'); emit('cancel');
visible.value = false; visible.value = false;
//
router.push('/login');
}; };
// ----------------------- ----------------------------
defineExpose({
showDrawer,
hideDrawer,
});
</script> </script>
<style scoped> <style scoped>

8
vite.config.js

@ -35,14 +35,14 @@ export default {
proxy: { proxy: {
// 代理API路径 // 代理API路径
'/api': { '/api': {
target: 'http://8.148.67.92:8080/', // 目标服务器地址 //target: 'http://8.148.67.92:8080/', // 目标服务器地址
//target: 'http://127.0.0.1:8080/', target: 'http://127.0.0.1:8080/',
changeOrigin: true, // 是否修改请求头中的 Origin 字段 changeOrigin: true, // 是否修改请求头中的 Origin 字段
rewrite: (path) => path.replace(/^\/api/, ''), // 重写路径 rewrite: (path) => path.replace(/^\/api/, ''), // 重写路径
}, },
'/login': { '/login': {
target: 'http://8.148.67.92:8080/', // 目标服务器地址 //target: 'http://8.148.67.92:8080/', // 目标服务器地址
//target: 'http://127.0.0.1:8080/', target: 'http://127.0.0.1:8080/',
changeOrigin: true, // 是否修改请求头中的 Origin 字段 changeOrigin: true, // 是否修改请求头中的 Origin 字段
rewrite: (path) => path.replace(/^\/api/, ''), // 重写路径 rewrite: (path) => path.replace(/^\/api/, ''), // 重写路径
}, },

Loading…
Cancel
Save