|
|
@@ -37,6 +37,7 @@ import { mapDataAll1 } from "../C1User/AddUser/city";
|
|
|
import LookReDo from "./LookReDo";
|
|
|
import EditNum from "./EditNum";
|
|
|
import MateNum from "./MateNum";
|
|
|
+import { getTokenInfo } from "@/utils/storage";
|
|
|
|
|
|
function B2Scene() {
|
|
|
const dispatch = useDispatch();
|
|
|
@@ -372,7 +373,7 @@ function B2Scene() {
|
|
|
datas: [
|
|
|
{
|
|
|
sheetData: res.data.records.map((v: B2tableType) => ({
|
|
|
- roomName:v.roomName||'(空)',
|
|
|
+ roomName: v.roomName || "(空)",
|
|
|
roomNum: v.roomNum || "(空)",
|
|
|
myCity:
|
|
|
!v.province && !v.city && !v.region
|
|
|
@@ -439,6 +440,15 @@ function B2Scene() {
|
|
|
// 场景码匹配
|
|
|
const [mateNum, setMateNum] = useState(false);
|
|
|
|
|
|
+ // 场景码匹配按钮 只有管理员才会显示
|
|
|
+ const [mateBtnShow, setMateBtnShow] = useState(false);
|
|
|
+
|
|
|
+ useEffect(() => {
|
|
|
+ const userInfo = getTokenInfo().user;
|
|
|
+ if (userInfo && userInfo.isAdmin && userInfo.isAdmin === 1)
|
|
|
+ setMateBtnShow(true);
|
|
|
+ }, []);
|
|
|
+
|
|
|
return (
|
|
|
<div className={styles.B2Scene}>
|
|
|
<div className="pageTitle">场景审核</div>
|
|
|
@@ -515,8 +525,12 @@ function B2Scene() {
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <Button onClick={() => setMateNum(true)}>场景码匹配</Button>
|
|
|
-  
|
|
|
+ {mateBtnShow ? (
|
|
|
+ <>
|
|
|
+ <Button onClick={() => setMateNum(true)}>场景码匹配</Button>
|
|
|
+  
|
|
|
+ </>
|
|
|
+ ) : null}
|
|
|
<Button onClick={() => setLookReDo(true)}>查看重复的场景</Button>
|
|
|
 
|
|
|
<Button onClick={resetSelectFu}>重置</Button> 
|