mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 04:46:46 +08:00
feat:添加讨论,添加活动,新建关卡接口对接
This commit is contained in:
@@ -33,7 +33,8 @@
|
||||
v-model:value="inputV1"
|
||||
style="width: 424px; height: 32px"
|
||||
placeholder="请输入讨论名称"
|
||||
maxlength="20"
|
||||
show-count
|
||||
:maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -46,6 +47,8 @@
|
||||
v-model:value="textV1"
|
||||
placeholder="请输入讨论说明"
|
||||
allow-clear
|
||||
show-count
|
||||
:maxlength="200"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -61,13 +64,15 @@
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
<button class="btn2" @click="createDiscuss">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import * as api from "../../api/discuss";
|
||||
import { message } from "ant-design-vue";
|
||||
const rowSelection = ref({
|
||||
checkStrictly: false,
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
@@ -103,15 +108,47 @@ export default {
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:adddiscussVisible", false);
|
||||
state.inputV1 = "";
|
||||
state.textV2 = "";
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
};
|
||||
|
||||
//创建讨论
|
||||
const createDiscuss = () => {
|
||||
if(!state.inputV1) return message.info("请输入讨论名称");
|
||||
let obj = {
|
||||
discussName: state.inputV1, //讨论名称
|
||||
discussExplain: state.textV1, //讨论说明
|
||||
discussSettings: state.checkedC1, //讨论设置
|
||||
createTime: "", //创建时间
|
||||
createUser: 0, //创建人
|
||||
discussFlag: "", //活动逻辑删除标识
|
||||
discussId: 0, //讨论Id
|
||||
discussTag: "", //是否必修的标识
|
||||
updateTime: "", //更新时间
|
||||
updateUser: 0, //更新人
|
||||
projectId: 0, //项目id
|
||||
};
|
||||
api
|
||||
.createDiscuss(obj)
|
||||
.then((res) => {
|
||||
setTimeout(() => {
|
||||
console.log("创建成功", res);
|
||||
message.success("创建成功");
|
||||
}, 1000);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败", err);
|
||||
});
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
rowSelection,
|
||||
createDiscuss,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -160,6 +197,9 @@ export default {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
.ant-input {
|
||||
height: 100%;
|
||||
}
|
||||
.xkbtn {
|
||||
cursor: pointer;
|
||||
width: 130px;
|
||||
@@ -185,40 +225,22 @@ export default {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.kqszbox {
|
||||
.qdqtbox {
|
||||
margin-left: 56px;
|
||||
}
|
||||
.setbox {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 24px;
|
||||
.timerbox {
|
||||
margin-top: 6px;
|
||||
margin-right: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btnbox2 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
.xkbtn {
|
||||
cursor: pointer;
|
||||
width: 130px;
|
||||
height: 40px;
|
||||
background: #388be1;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-right: 16px 8px 32px 0;
|
||||
color: #fff;
|
||||
margin-top: 16px;
|
||||
margin-bottom: 60px;
|
||||
.textarea {
|
||||
width: 423px;
|
||||
.ant-input {
|
||||
width: 100%;
|
||||
}
|
||||
.ant-input-textarea-show-count {
|
||||
position: relative;
|
||||
}
|
||||
.ant-input-textarea-show-count::after {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 0px;
|
||||
}
|
||||
.ant-input {
|
||||
border-radius: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user