# 六盘水烟草
### 安装依赖
npm install
或者,直接解压里面的node_modules压缩包
### 运行
npm run dev
### 打包
npm run build
# ================== 组件使用 ==================
## 选择单位
```js
import Choosebm from "@/components/MyComponents/ChooseDept/index.vue";
const showDept = ref(false);
const zzlx = ref(null);
const deptChange = (val) => {
fromData.value.responsibledeptname = val.orgName;
fromData.value.responsibledeptid = val.id;
}
```
```js
## mosty 组件
import * as MOSTY from "@/components/MyComponents/index";
```
## 标题组件
```html
```
## 编辑和删除 查看
```html
编辑
删除
查看
```
## 文本框调高
```vue
:autosize="{minRows:2,maxRows:5}"
```
## 烟草api
```js
import { getApi, postApi } from "@/api/tobAcco_api.js";
```
## 字典调用方法
```js
const { proxy } = getCurrentInstance();
const { D_TB_NHDJ } = proxy.$dict("D_TB_NHDJ");
```
```js
props.rowItem.orgCode && props.rowItem.orgCode.replace('XN', '')
ssbmid string 所属部门id
ssbmmc string 所属部门名字
删除
// 冒泡排序
```
### 导入
```js
// 导入模板数据
const uploadFile = () => {
nextTick(() => {
fileBtn.value.click()
})
}
// 获取文件
const changeFile = () => {
nextTick(() => {
let file = fileBtn.value.files[0]
if (!file) { return; }
let data = new FormData()
data.append('file', file);
uploadfilApi(data, `/mosty-jcgl/target/batchUpload`).then(() => {
ElMessage.success("批量上传成功");
listQuery.pageCurrent = 1;
getTabList();
}).finally(() => {
fileBtn.value.value = ''
})
})
}